module
Version:
v0.0.0-...-f230776
Opens a new window with list of versions in this module.
Published: Jul 23, 2022
License: GPL-3.0
Opens a new window with license information.
README
¶
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
- When the codebase is big, I really miss the
const
type qualifier to prevent unexpected modification.
- Golang uses identifier names to represent public/private, so it's similar to use it for other purpose.
- It's a general notation to use
k
in naming, to represent it's a constant.
Click to show internal directories.
Click to hide internal directories.