Skip to content

Commit c1930da

Browse files
refactor: rename tls flag const
1 parent 7f615a3 commit c1930da

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

pkg/analyzer/analyzer.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ import (
1414
)
1515

1616
const (
17-
TimeWeekdayFlag = "time-weekday"
18-
TimeMonthFlag = "time-month"
19-
TimeLayoutFlag = "time-layout"
20-
CryptoHashFlag = "crypto-hash"
21-
HTTPMethodFlag = "http-method"
22-
HTTPStatusCodeFlag = "http-status-code"
23-
RPCDefaultPathFlag = "rpc-default-path"
24-
OSDevNullFlag = "os-dev-null"
25-
SQLIsolationLevelFlag = "sql-isolation-level"
26-
TLSSignatureScheme = "tls-signature-scheme"
17+
TimeWeekdayFlag = "time-weekday"
18+
TimeMonthFlag = "time-month"
19+
TimeLayoutFlag = "time-layout"
20+
CryptoHashFlag = "crypto-hash"
21+
HTTPMethodFlag = "http-method"
22+
HTTPStatusCodeFlag = "http-status-code"
23+
RPCDefaultPathFlag = "rpc-default-path"
24+
OSDevNullFlag = "os-dev-null"
25+
SQLIsolationLevelFlag = "sql-isolation-level"
26+
TLSSignatureSchemeFlag = "tls-signature-scheme"
2727
)
2828

2929
// New returns new usestdlibvars analyzer.
@@ -48,7 +48,7 @@ func flags() flag.FlagSet {
4848
flags.Bool(RPCDefaultPathFlag, false, "suggest the use of rpc.DefaultXXPath")
4949
flags.Bool(OSDevNullFlag, false, "suggest the use of os.DevNull")
5050
flags.Bool(SQLIsolationLevelFlag, false, "suggest the use of sql.LevelXX.String()")
51-
flags.Bool(TLSSignatureScheme, false, "suggest the use of tls.SignatureScheme.String()")
51+
flags.Bool(TLSSignatureSchemeFlag, false, "suggest the use of tls.SignatureScheme.String()")
5252
return *flags
5353
}
5454

@@ -107,7 +107,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
107107
checkSQLIsolationLevel(pass, n)
108108
}
109109

110-
if lookupFlag(pass, TLSSignatureScheme) {
110+
if lookupFlag(pass, TLSSignatureSchemeFlag) {
111111
checkTLSSignatureScheme(pass, n)
112112
}
113113

pkg/analyzer/analyzer_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestUseStdlibVars(t *testing.T) {
2828
mustNil(t, a.Flags.Set(analyzer.RPCDefaultPathFlag, "true"))
2929
mustNil(t, a.Flags.Set(analyzer.OSDevNullFlag, "true"))
3030
mustNil(t, a.Flags.Set(analyzer.SQLIsolationLevelFlag, "true"))
31-
mustNil(t, a.Flags.Set(analyzer.TLSSignatureScheme, "true"))
31+
mustNil(t, a.Flags.Set(analyzer.TLSSignatureSchemeFlag, "true"))
3232

3333
analysistest.Run(t, analysistest.TestData(), a, pkgs...)
3434
}

0 commit comments

Comments
 (0)