funcguard

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	*analysis.Analyzer
	// contains filtered or unexported fields
}

func NewAnalyzer

func NewAnalyzer(opts ...Option) (*Analyzer, error)

type Config

type Config struct {
	Rules []*Rule `yaml:"rules"`
}

type LogFunc

type LogFunc func(format string, a ...any)

type Option

type Option func(*Analyzer)

func WithCmdlineFlags

func WithCmdlineFlags() Option

func WithConfig

func WithConfig(cfg *Config) Option

func WithLogger

func WithLogger(logFn LogFunc) Option

type Rule

type Rule struct {
	FunctionPath string `yaml:"function-path"`
	ErrorMsg     string `yaml:"error-msg"`
}

Jump to

Keyboard shortcuts

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