dependabot[bot] a303529ad3
build(deps): bump go.tmz.dev/musttag from 0.7.0 to 0.7.1 (#3924)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2023-06-23 17:09:02 +02:00

26 lines
477 B
Go

//golangcitest:args -Emusttag
package testdata
import (
"encoding/asn1"
"encoding/json"
)
// builtin functions:
func musttagJSON() {
var user struct { // want "`anonymous struct` should be annotated with the `json` tag as it is passed to `json.Marshal` at "
Name string
Email string `json:"email"`
}
json.Marshal(user)
}
// custom functions from config:
func musttagASN1() {
var user struct {
Name string
Email string `asn1:"email"`
}
asn1.Marshal(user)
}