README ¶ mapkeyexistscheck mapkeyexistscheck is a lint program that enforces checking for the existence of a key when accessing a map. Install go install github.com/resessh/mapkeyexistscheck/cmd/mapkeyexistscheck@latest Usage package main func main() { m := map[int]string{ 1: "1", } val := m[2] // ... } $ go vet -vettool=(which mapkeyexistscheck) ./... main.go:8:2: map key exists check is not performed Expand ▾ Collapse ▴ Documentation ¶ Index ¶ Variables Constants ¶ This section is empty. Variables ¶ View Source var Analyzer = &analysis.Analyzer{ Name: "mapkeyexistscheck", Doc: "checking an existence check is being performed when accessing a map", Run: run, } Functions ¶ This section is empty. Types ¶ This section is empty. Source Files ¶ View all Source files mapkeyexistscheck.go Directories ¶ Show internal Expand all Path Synopsis cmd mapkeyexistscheck plugin tools Click to show internal directories. Click to hide internal directories.