Documentation ¶
Overview ¶
pray is a tool for finding unused public items (functions, methods, types, variables and constants) in packages, searching in a given context (the context being a list of packages).
Example of use:
% pray -src github.com/tsuru/config github.com/tsuru/tsuru/app /Users/f/src/github.com/tsuru/config/checker.go:10:6: Check is unused /Users/f/src/github.com/tsuru/config/config.go:113:6: WriteConfigFile is unused /Users/f/src/github.com/tsuru/config/config.go:229:6: GetUint is unused /Users/f/src/github.com/tsuru/config/config.go:75:6: ReadAndWatchConfigFile is unused /Users/f/src/github.com/tsuru/config/config.go:296:6: GetList is unused /Users/f/src/github.com/tsuru/config/config.go:208:6: GetFloat is unused
The flag -src specifies the source packages, and then users can provide the set of packages for searching. Users can also use the Go notation for expanding subpackages:
% pray -src github.com/tsuru/config github.com/tsuru/tsuru/...
Click to show internal directories.
Click to hide internal directories.