Documentation ¶
Overview ¶
Package nomainreturn defines an Analyzer that reports use of return keyword in the main.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAllowPackages = []string{"main"}
DefaultAllowPackages is an allow-list of packages to include when running the linter.
View Source
var DefaultConfig = Config{ AllowPackages: DefaultAllowPackages, }
DefaultConfig is a default linter config.
Functions ¶
func NewAnalyzer ¶
NewAnalyzer creates new nomainreturn analyzer.
Types ¶
type Config ¶
type Config struct { // AllowPackages defines a list of packages that linter should check. // // Generally, package main will be only allowed package, but for testing cases // you may include other packages. AllowPackages []string `mapstructure:"allowPackages" yaml:"allowPackages"` }
Config is a set of configuration values which configure the linter behavior.
Click to show internal directories.
Click to hide internal directories.