Skip to content

Commit

Permalink
Improve a comment for the structcopy package.
Browse files Browse the repository at this point in the history
  • Loading branch information
josephspurrier committed Jul 9, 2018
1 parent a6a6ba4 commit 5d331b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/webapi/pkg/structcopy/structcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func ByTag(src interface{}, srcTag string, dst interface{}, dstTag string) (err
fieldD := vd.Field(jD)
tagD := keysDst.Field(jD).Tag

// Set the "status" field.
// If the tags match, copy the value from src to dst field.
if tagS.Get(srcTag) == tagD.Get(dstTag) {
if fieldS.Type() != fieldD.Type() {
return fmt.Errorf("field types do not match - src type '%v' for tag '%v' do not match dst type '%v' for tag '%v'",
Expand Down

0 comments on commit 5d331b0

Please sign in to comment.