Skip to content

Automatically renames constants according to golang conventions

Notifications You must be signed in to change notification settings

tshprecher/goname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

goname

Goname properly formats the names of package level variables and constants according to golang conventions. For example, a variable named "GLOBAL_VARIABLE" will be renamed to "GlobalVariable". This does not modify access levels. Private variables remain private and public variables remain public.

Renaming is implemented via calls to gorename. To install gorename, run

$ go install golang.org/x/tools/cmd/gorename

Make sure gorename exists in your $PATH.

examples:

To format the names in a given package, run

$ goname path/to/golang/package

To identify malformed names without renaming, run

$ goname -l path/to/golang/package

About

Automatically renames constants according to golang conventions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages