README ¶ set analyzer Detects map[string]bool values that are only ever written the constant true, signalling they are being used as sets. Recommends switching to map[string]struct{} to avoid wasted heap. Run it go install github.com/ribice/smgt/cmd/set@latest set ./... Typical finding hosts := map[string]bool{} // flagged: prefer map[string]struct{} hosts[h.Name] = true Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func NewAnalyzer() *analysis.Analyzer Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewAnalyzer ¶ func NewAnalyzer() *analysis.Analyzer Types ¶ This section is empty. Source Files ¶ View all Source files set.go Click to show internal directories. Click to hide internal directories.