config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StructRule defines rule type of struct definitions.
	StructRule = "struct"
	// CallRule defines rule type of function calls.
	CallRule = "call"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	IgnoreParentRules bool
	Rules             []Rule
}

Package defines rules for a package.

type Packages

type Packages map[string]Package

Packages defines rules package mapping.

type Rule

type Rule struct {
	Type    RuleType
	Name    String
	Package String
}

Rule defines a rule.

func (*Rule) String

func (r *Rule) String() string

type RuleType

type RuleType string

RuleType defines rule type.

type String

type String struct {
	Value string
	Regex bool
	// contains filtered or unexported fields
}

String is a wrapper around string is either plain string or regular expresion.

func (*String) Compile

func (s *String) Compile(pattern string) error

Compile compiles String if it is a regular expression.

func (*String) Match

func (s *String) Match(m string) bool

Match checks if given string match. If it is regex, compiled regex used.

func (*String) String

func (s *String) String() string

Jump to

Keyboard shortcuts

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