Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = SCAnalyzer.Analyzer
View Source
var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{ Analyzer: &analysis.Analyzer{ Name: "SA1029", Requires: []*analysis.Analyzer{buildir.Analyzer}, Run: callcheck.Analyzer(checkWithValueKeyRules), }, Doc: &lint.RawDocumentation{ Title: `Inappropriate key in call to \'context.WithValue\'`, Text: `The provided key must be comparable and should not be of type \'string\' or any other built-in type to avoid collisions between packages using context. Users of \'WithValue\' should define their own types for keys. To avoid allocating when assigning to an \'interface{}\', context keys often have concrete type \'struct{}\'. Alternatively, exported context key variables' static type should be a pointer or interface.`, Since: "2020.1", Severity: lint.SeverityWarning, MergeIf: lint.MergeIfAny, }, })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.