diff --git a/analyzer.go b/analyzer.go index c921e6d..96bf637 100644 --- a/analyzer.go +++ b/analyzer.go @@ -9,7 +9,7 @@ import ( ) // NewAnalyzer returns a new analyzer to check for receiver type consistency. -func NewAnalyzer(s Setting) *analysis.Analyzer { +func NewAnalyzer(s Settings) *analysis.Analyzer { // Default excludes for Marshal/Encode methods https://github.com/raeperd/recvcheck/issues/7 excludedMethods := map[string]struct{}{ "MarshalText": {}, @@ -34,8 +34,8 @@ func NewAnalyzer(s Setting) *analysis.Analyzer { } } -// Setting is the configuration for the analyzer. -type Setting struct { +// Settings is the configuration for the analyzer. +type Settings struct { // DisableBuiltin if true, disables the built-in method excludes. // Built-in excluded methods: // - "MarshalText" diff --git a/analyzer_test.go b/analyzer_test.go index e8f17d5..e09cc14 100644 --- a/analyzer_test.go +++ b/analyzer_test.go @@ -8,5 +8,5 @@ import ( ) func TestAnalyzer(t *testing.T) { - analysistest.Run(t, analysistest.TestData(), recvcheck.NewAnalyzer(recvcheck.Setting{}), "test") + analysistest.Run(t, analysistest.TestData(), recvcheck.NewAnalyzer(recvcheck.Settings{}), "test") } diff --git a/cmd/recvcheck/main.go b/cmd/recvcheck/main.go index 029e4ed..c23dd89 100644 --- a/cmd/recvcheck/main.go +++ b/cmd/recvcheck/main.go @@ -14,7 +14,7 @@ func main() { flag.BoolVar(&noBuiltinExcludeMethod, "no-builtin-exclude-method", false, `disables the default exclude methods such as "MarshalJSON"`) - setting := recvcheck.Setting{ + setting := recvcheck.Settings{ DisableBuiltin: noBuiltinExcludeMethod, } singlechecker.Main(recvcheck.NewAnalyzer(setting))