AT009

Acceptance testsStandard

check for acctest.RandStringFromCharSet() calls that can be simplified to acctest.RandString()

The AT009 analyzer reports where acctest.RandStringFromCharSet() calls can be simplified to acctest.RandString().

Examples

rString := acctest.RandStringFromCharSet(8, acctest.CharSetAlphaNum)
rString := acctest.RandString(8)

Ignoring reports

Singular reports can be ignored by adding a //lintignore:AT009 Go code comment at the end of the offending line or on the line immediately preceding, e.g.

//lintignore:AT009
rString := acctest.RandStringFromCharSet(8, acctest.CharSetAlphaNum)

This page is generated from passes/AT009/README.md, which lives beside the analyzer.