flagexorcist

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer *analysis.Analyzer = &analysis.Analyzer{
	Name: "flagexorcist",
	Doc:  "Finds old flags",
	Run:  r.run,
	Requires: []*analysis.Analyzer{
		inspect.Analyzer,
	},
}

Functions

func Initialize

func Initialize(cfg Config)

Types

type Config

type Config struct {
	// The symbols that the user wants to look at
	FlagSymbols []string `env:"FLAG_SYMBOLS" env-required:"true"`

	// Cutoff duration for how old a flag can be before we complain about it
	Cutoff time.Duration `env:"CUTOFF" env-required:"true"`

	// Log level to log at
	LogLevel LogLevel `env:"LOG_LEVEL" env-default:"info"`

	// Path to the git repo. Defaults to the current directory.
	RepoPath string `env:"REPO_PATH" env-default:"."`
}

type LogLevel

type LogLevel zerolog.Level

func (*LogLevel) SetValue

func (l *LogLevel) SetValue(s string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL