k4Const

module
v0.0.0-...-f230776 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2022 License: GPL-3.0

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

  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.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL