Documentation
¶
Index ¶
- func NewAnalyzer(config *string) *analysis.Analyzer
- type Analyzer
- type Calculable
- type Config
- type ConstValue
- type Fix
- type Issue
- type Location
- type Option
- type Reader
- func (r *Reader) Done() bool
- func (r *Reader) Finish() string
- func (r *Reader) Location() Location
- func (r *Reader) Next() rune
- func (r *Reader) Peek() rune
- func (r *Reader) Position() int
- func (r *Reader) ReadWhile(match func(rune) bool) string
- func (r *Reader) SetOffset(offset Location)
- func (r *Reader) SetPosition(pos int)
- type RegexpValue
- type Target
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAnalyzer ¶
Types ¶
type Calculable ¶
type Config ¶ added in v1.0.0
type Config struct {
// Values is map of values. Supports two types 'const` and `regexp`. Values can be used recursively.
// DEPRECATED: Use Vars instead.
Values map[string]map[string]string `yaml:"values"`
// Template is template for checking. Uses values.
Template string `yaml:"template"`
// TemplatePath path to the template file. Useful if need to load the template from a specific file.
TemplatePath string `yaml:"template-path"`
// Vars is map of values. Values can be used recursively.
Vars map[string]string `yaml:"vars"`
}
Config represents go-header linter setup parameters
func (*Config) GetTemplate ¶ added in v1.0.0
type ConstValue ¶
type ConstValue struct {
RawValue, Value string
}
func (*ConstValue) Get ¶
func (c *ConstValue) Get() string
func (*ConstValue) Raw ¶ added in v0.5.0
func (c *ConstValue) Raw() string
func (*ConstValue) Read ¶
func (c *ConstValue) Read(s *Reader) Issue
func (*ConstValue) String ¶ added in v0.5.0
func (c *ConstValue) String() string
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithTemplate ¶
func WithValues ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) SetPosition ¶
type RegexpValue ¶
type RegexpValue struct {
RawValue, Value string
}
func (*RegexpValue) Get ¶
func (r *RegexpValue) Get() string
func (*RegexpValue) Raw ¶ added in v0.5.0
func (r *RegexpValue) Raw() string
func (*RegexpValue) Read ¶
func (r *RegexpValue) Read(s *Reader) Issue
func (*RegexpValue) String ¶ added in v0.5.0
func (r *RegexpValue) String() string
type Value ¶
type Value interface {
Calculable
Read(*Reader) Issue
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.