Skip to content

Tool: buildtag prints buildtags which are used in specified packages

License

Notifications You must be signed in to change notification settings

gostaticanalysis/buildtag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buidtag

buildtag prints buildtags which are used in specified packages.

Install

$ go install github.com/gostaticanalysis/buildtag/cmd/buildtag@latest

Usage

$ buildtag golang.org/x/net/context
!go1.7 /Users/tenntenn/go/pkg/mod/golang.org/x/[email protected]/context/context_test.go
go1.7 /Users/tenntenn/go/pkg/mod/golang.org/x/[email protected]/context/go17.go
go1.9 /Users/tenntenn/go/pkg/mod/golang.org/x/[email protected]/context/go19.go
!go1.7 /Users/tenntenn/go/pkg/mod/golang.org/x/[email protected]/context/pre_go17.go
!go1.9 /Users/tenntenn/go/pkg/mod/golang.org/x/[email protected]/context/pre_go19.go
$ buildtag -tag "^go1\.*" golang.org/x/net/context
/Users/tenntenn/go/pkg/mod/golang.org/x/[email protected]/context/go17.go:go1.7
/Users/tenntenn/go/pkg/mod/golang.org/x/[email protected]/context/go19.go:go1.9
$ buildtag -f="{{.Constraint}}" golang.org/x/net/context | sort | uniq
!go1.7
!go1.9
go1.7
go1.9

About

Tool: buildtag prints buildtags which are used in specified packages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages