diff --git a/module/replace.go b/module/replace.go index eba53bb..c4afdb3 100644 --- a/module/replace.go +++ b/module/replace.go @@ -3,6 +3,7 @@ package module import ( "go/ast" "go/token" + "sort" "strings" "github.com/fatih/structtag" @@ -98,6 +99,7 @@ func (v retag) Visit(n ast.Node) ast.Visitor { for _, t := range newTags.Tags() { oldTags.Set(t) } + sort.Stable(oldTags) f.Tag.Value = "`" + oldTags.String() + "`" diff --git a/module/tagger.go b/module/tagger.go index 4e38d2b..41ed28e 100644 --- a/module/tagger.go +++ b/module/tagger.go @@ -32,7 +32,6 @@ func (mod) Name() string { } func (m mod) Execute(targets map[string]pgs.File, packages map[string]pgs.Package) []pgs.Artifact { - xtv := m.Parameters().Str("xxx") xtv = strings.Replace(xtv, "+", ":", -1)