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