Compare commits

..

No commits in common. "master" and "1.1.1" have entirely different histories.

8 changed files with 11 additions and 15 deletions

View File

@ -1,5 +1,5 @@
[![Go Report Card](https://goreportcard.com/badge/git.webz.asia/go-convert/fields)](https://goreportcard.com/report/git.webz.asia/go-convert/fields)
[![Actions Status](https://git.webz.asia/go-convert/fields/workflows/Go/badge.svg)](https://git.webz.asia/go-convert/fields/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-convert/fields)](https://goreportcard.com/report/github.com/go-convert/fields)
[![Actions Status](https://github.com/go-convert/fields/workflows/Go/badge.svg)](https://github.com/go-convert/fields/actions)
[![Build Status](https://travis-ci.org/go-convert/fields.svg?branch=master)](https://travis-ci.org/go-convert/fields)
[![codecov](https://codecov.io/gh/go-convert/fields/branch/master/graph/badge.svg)](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 {

View File

@ -25,7 +25,7 @@ import (
"encoding/json"
"log"
"git.webz.asia/go-convert/fields"
"github.com/go-convert/fields"
)
type fromStruct struct {

View File

@ -25,7 +25,7 @@ import (
"encoding/json"
"log"
"git.webz.asia/go-convert/fields"
"github.com/go-convert/fields"
)
type fromStructCustom struct {

View File

@ -25,7 +25,7 @@ import (
"encoding/json"
"log"
"git.webz.asia/go-convert/fields"
"github.com/go-convert/fields"
)
type FromStructBase struct {

View File

@ -25,7 +25,7 @@ import (
"encoding/json"
"log"
"git.webz.asia/go-convert/fields"
"github.com/go-convert/fields"
"github.com/satori/go.uuid"
)

View File

@ -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)
}

View File

@ -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 {

2
go.mod
View File

@ -1,4 +1,4 @@
module git.webz.asia/go-convert/fields
module github.com/go-convert/fields
go 1.13