8000 GitHub - ufukty/golits: CLI utility to check if a Go file uses same string literal multiple times
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ golits Public

CLI utility to check if a Go file uses same string literal multiple times

License

Notifications You must be signed in to change notification settings

ufukty/golits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golits (go literals)

golits is a CLI utility that lists all duplicate string literals found in a Go file. It is designed to catch multiple uses of same string literals for declaring different error types. Which confuse clients.

golits expects the first and only argument to be the filename. It exits with non-0 status code for IO and parsing errors and if there are multiple use of same string literal.

Install

go install github.com/ufukty/golits@latest

Usage

$ golits errors.go
# "invalid-value" (errors.go:15:27, errors.go:16:27, errors.go:17:27)

Contribution

Issues, PRs and discussions are welcome.

License

MIT

About

CLI utility to check if a Go file uses same string literal multiple times

Resources

License

Stars

Watchers

Forks

Languages

0