Skip to content

Commit

Permalink
build(deps): bump github.com/junk1tm/musttag from 0.4.5 to 0.5.0 (#3624)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmzane committed Feb 23, 2023
1 parent 610a2bd commit ca5738e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ require (
github.com/jingyugao/rowserrcheck v1.1.1
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af
github.com/julz/importas v0.1.0
github.com/junk1tm/musttag v0.4.5
github.com/junk1tm/musttag v0.5.0
github.com/kisielk/errcheck v1.6.3
github.com/kkHAIKE/contextcheck v1.1.3
github.com/kulti/thelper v0.6.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions test/testdata/musttag.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ import (

// builtin functions:
func musttagJSON() {
var user struct { // want `exported fields should be annotated with the "json" tag`
var user struct { // want "`anonymous struct` should be annotated with the `json` tag as it is passed to `json.Marshal` at test(/|\\\\)testdata(/|\\\\)musttag.go:15:2"
Name string
Email string `json:"email"`
}
json.Marshal(user)
json.Unmarshal(nil, &user)
}

// custom functions from config:
Expand All @@ -23,5 +22,4 @@ func musttagASN1() {
Email string `asn1:"email"`
}
asn1.Marshal(user)
asn1.Unmarshal(nil, &user)
}
6 changes: 2 additions & 4 deletions test/testdata/musttag_custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ import (

// builtin functions:
func musttagJSONCustom() {
var user struct { // want `exported fields should be annotated with the "json" tag`
var user struct { // want "`anonymous struct` should be annotated with the `json` tag as it is passed to `json.Marshal` at test(/|\\\\)testdata(/|\\\\)musttag_custom.go:16:2"
Name string
Email string `json:"email"`
}
json.Marshal(user)
json.Unmarshal(nil, &user)
}

// custom functions from config:
func musttagASN1Custom() {
var user struct { // want `exported fields should be annotated with the "asn1" tag`
var user struct { // want "`anonymous struct` should be annotated with the `asn1` tag as it is passed to `asn1.Marshal` at test(/|\\\\)testdata(/|\\\\)musttag_custom.go:25:2"
Name string
Email string `asn1:"email"`
}
asn1.Marshal(user)
asn1.Unmarshal(nil, &user)
}

0 comments on commit ca5738e

Please sign in to comment.