Compare commits
No commits in common. "master" and "1.1.1" have entirely different histories.
@ -1,5 +1,5 @@
|
||||
[](https://goreportcard.com/report/git.webz.asia/go-convert/fields)
|
||||
[](https://git.webz.asia/go-convert/fields/actions)
|
||||
[](https://goreportcard.com/report/github.com/go-convert/fields)
|
||||
[](https://github.com/go-convert/fields/actions)
|
||||
[](https://travis-ci.org/go-convert/fields)
|
||||
[](https://codecov.io/gh/go-convert/fields)
|
||||
|
||||
@ -15,7 +15,7 @@ import (
|
||||
"log"
|
||||
"encoding/json"
|
||||
|
||||
"git.webz.asia/go-convert/fields"
|
||||
"github.com/go-convert/fields"
|
||||
)
|
||||
|
||||
type FromStruct struct {
|
||||
@ -80,7 +80,7 @@ import (
|
||||
"log"
|
||||
"encoding/json"
|
||||
|
||||
"git.webz.asia/go-convert/fields"
|
||||
"github.com/go-convert/fields"
|
||||
)
|
||||
|
||||
type FromStructCustom struct {
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
|
||||
"git.webz.asia/go-convert/fields"
|
||||
"github.com/go-convert/fields"
|
||||
)
|
||||
|
||||
type fromStruct struct {
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
|
||||
"git.webz.asia/go-convert/fields"
|
||||
"github.com/go-convert/fields"
|
||||
)
|
||||
|
||||
type fromStructCustom struct {
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
|
||||
"git.webz.asia/go-convert/fields"
|
||||
"github.com/go-convert/fields"
|
||||
)
|
||||
|
||||
type FromStructBase struct {
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
|
||||
"git.webz.asia/go-convert/fields"
|
||||
"github.com/go-convert/fields"
|
||||
"github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
|
@ -84,11 +84,7 @@ func Сonvert(from interface{}, kind string, to interface{}) {
|
||||
switch f.Type.String() {
|
||||
case "uuid.UUID":
|
||||
mv := fv.Interface().(uuid.UUID)
|
||||
if ft.Type().String() == "uuid.UUID" {
|
||||
ft.Set(fv)
|
||||
} else {
|
||||
ft.SetString(mv.String())
|
||||
}
|
||||
default:
|
||||
ft.Set(fv)
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ import (
|
||||
"github.com/satori/go.uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"git.webz.asia/go-convert/fields"
|
||||
"github.com/go-convert/fields"
|
||||
)
|
||||
|
||||
type FromStruct struct {
|
||||
|
Loading…
Reference in New Issue
Block a user