Documentation ¶
Index ¶
- type MissingPlaceholdersError
- type Option
- type Replacer
- type Tracer
- func (t *Tracer) AppendMiscError(miscError string)
- func (t *Tracer) Err() error
- func (t *Tracer) Replace(content, placeholder, replacement string) string
- func (t *Tracer) ReplaceAll(content, placeholder, replacement string) string
- func (t *Tracer) ReplaceOnce(content, placeholder, replacement string) string
- type ValidationMiscError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MissingPlaceholdersError ¶
type MissingPlaceholdersError struct {
// contains filtered or unexported fields
}
MissingPlaceholdersError is used as an error when a source file is missing placeholder
func (*MissingPlaceholdersError) Error ¶
func (e *MissingPlaceholdersError) Error() string
Error implements error interface
func (*MissingPlaceholdersError) Is ¶
func (e *MissingPlaceholdersError) Is(err error) bool
Is true if both errors have the same list of missing placeholders.
func (*MissingPlaceholdersError) ValidationInfo ¶
func (e *MissingPlaceholdersError) ValidationInfo() string
ValidationInfo implements validation.Error interface
type Option ¶
type Option func(*Tracer)
Option for configuring session.
func WithAdditionalInfo ¶
WithAdditionalInfo will append info to the validation error.
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
Tracer keeps track of missing placeholders or other issues related to file modification.
func (*Tracer) AppendMiscError ¶
AppendMiscError allows to track errors not related to missing placeholders during file modification
func (*Tracer) ReplaceAll ¶
ReplaceAll replace all placeholders in content with replacement string.
func (*Tracer) ReplaceOnce ¶
ReplaceOnce will replace placeholder in content only if replacement is not already found in content.
type ValidationMiscError ¶
type ValidationMiscError struct {
// contains filtered or unexported fields
}
ValidationMiscError is used as a miscellaneous error related to validation
func (*ValidationMiscError) Error ¶
func (e *ValidationMiscError) Error() string
Error implements error interface
func (*ValidationMiscError) ValidationInfo ¶
func (e *ValidationMiscError) ValidationInfo() string
ValidationInfo implements validation.Error interface