Documentation
¶
Overview ¶
Package ast provides AST modification utilities for modkit source files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDefinitionNotFound = errors.New("Definition method not found") ErrProvidersNotFound = errors.New("Providers field not found in Definition") ErrTokenExists = errors.New("provider token already exists") )
Common errors
View Source
var ErrControllersNotFound = errors.New("Controllers field not found in Definition")
ErrControllersNotFound is returned when Controllers field is not found in Definition
Functions ¶
func AddController ¶
AddController registers a new controller in the module definition
func AddProvider ¶
AddProvider registers a new provider in the module definition.
Types ¶
type ControllerError ¶
ControllerError represents an error during controller registration
func (*ControllerError) Error ¶
func (e *ControllerError) Error() string
func (*ControllerError) Unwrap ¶
func (e *ControllerError) Unwrap() error
type ProviderError ¶
type ProviderError struct {
Op string // operation: "parse", "validate", "find", "insert"
Token string
File string
Err error
}
ProviderError represents an error during provider registration
func (*ProviderError) Error ¶
func (e *ProviderError) Error() string
func (*ProviderError) Unwrap ¶
func (e *ProviderError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.