Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ require (
github.com/yeya24/promlinter v0.2.0
github.com/ykadowak/zerologlint v0.1.3
gitlab.com/bosi/decorder v0.4.1
go-simpler.org/musttag v0.8.0
go-simpler.org/sloglint v0.3.0
go.tmz.dev/musttag v0.7.2
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
golang.org/x/tools v0.15.0
gopkg.in/yaml.v3 v3.0.1
Expand Down
6 changes: 3 additions & 3 deletions go.sum

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

2 changes: 1 addition & 1 deletion pkg/golinters/musttag.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package golinters

import (
"go.tmz.dev/musttag"
"go-simpler.org/musttag"
"golang.org/x/tools/go/analysis"

"github.com/golangci/golangci-lint/pkg/config"
Expand Down
4 changes: 2 additions & 2 deletions test/testdata/musttag.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (

// 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 "
var user struct {
Name string
Email string `json:"email"`
}
json.Marshal(user)
json.Marshal(user) // want "the given struct should be annotated with the `json` tag"
}

// custom functions from config:
Expand Down
8 changes: 4 additions & 4 deletions test/testdata/musttag_custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ import (

// builtin functions:
func musttagJSONCustom() {
var user struct { // want "`anonymous struct` should be annotated with the `json` tag as it is passed to `json.Marshal` at "
var user struct {
Name string
Email string `json:"email"`
}
json.Marshal(user)
json.Marshal(user) // want "the given struct should be annotated with the `json` tag"
}

// custom functions from config:
func musttagASN1Custom() {
var user struct { // want "`anonymous struct` should be annotated with the `asn1` tag as it is passed to `asn1.Marshal` at "
var user struct {
Name string
Email string `asn1:"email"`
}
asn1.Marshal(user)
asn1.Marshal(user) // want "the given struct should be annotated with the `asn1` tag"
}