Skip to content

lance6716/k4Const

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k4Const: prevent kVarName-like variables from modifying it.

Example

go install github.com/lance6716/k4Const/cmd/k4const@latest
go vet -vettool=$(which k4const) ./...

Supported pattern

See test

Rationale

  1. When the codebase is big, I really miss the const type qualifier to prevent unexpected modification.
  2. Golang uses identifier names to represent public/private, so it's similar to use it for other purpose.
  3. It's a general notation to use k in naming, to represent it's a constant.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages