Documentation ¶
Index ¶
- Constants
- func Abbreviate(path string) string
- func AppendContextString(err error, msg string, c Context)
- func AppendError(err_ error, other_ error)
- func AppendString(err error, msg string)
- func PrependContextString(err error, msg string, c Context)
- func String2RuneSlice(s string) []rune
- func ToHTML(err error) string
- type Context
- func (c *Context) Content() string
- func (c *Context) Distance(other *Context) int
- func (c *Context) IncludeLeftSpace() Context
- func (c *Context) IncludeRightSpace() Context
- func (c *Context) IsAtLineStart() bool
- func (c *Context) IsAtSourceStart() bool
- func (c *Context) IsConsecutive(other Context) bool
- func (c *Context) IsSingleLine() bool
- func (c *Context) Len() int
- func (c *Context) Less(other *Context) bool
- func (a *Context) Merge(b Context) Context
- func (c *Context) NewContext(relStart, relStop int) Context
- func (c *Context) NewError(msg string) *ContextError
- func (c *Context) Path() string
- func (c *Context) Same(other *Context) bool
- func (c *Context) SearchReplaceOrig(old, new string) error
- func (c *Context) WritePrettyOneLiner() string
- type ContextError
- func (ce *ContextError) AppendContextString(msg string, c Context)
- func (ce *ContextError) AppendError(other *ContextError)
- func (ce *ContextError) AppendString(msg string)
- func (ce *ContextError) Error() string
- func (ce *ContextError) GetObject() interface{}
- func (ce *ContextError) PrependContextString(msg string, c Context)
- func (ce *ContextError) SetObject(obj interface{})
- func (ce *ContextError) ToHTML() string
- type Source
Constants ¶
View Source
const ( HIGHLIGHT_START = "\u001b[31;1m" // bold red HIGHLIGHT_STOP = "\u001b[0m" )
Variables ¶
This section is empty.
Functions ¶
func AppendContextString ¶
func AppendError ¶
func AppendString ¶
func PrependContextString ¶
func String2RuneSlice ¶ added in v0.5.0
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func MergeContexts ¶
func NewContext ¶
func SimpleFill ¶ added in v0.4.0
func (*Context) IncludeLeftSpace ¶ added in v0.4.0
func (*Context) IncludeRightSpace ¶ added in v0.4.0
func (*Context) IsAtLineStart ¶
func (*Context) IsAtSourceStart ¶
func (*Context) IsConsecutive ¶
func (*Context) IsSingleLine ¶
func (*Context) NewContext ¶
func (*Context) NewError ¶
func (c *Context) NewError(msg string) *ContextError
func (*Context) SearchReplaceOrig ¶
replace sadly means reading entire file, and then replacing it the reading has already been done though, so just use that WARNING: this is irreversible and should only be used during refactorings
func (*Context) WritePrettyOneLiner ¶
type ContextError ¶
type ContextError struct {
// contains filtered or unexported fields
}
func (*ContextError) AppendContextString ¶
func (ce *ContextError) AppendContextString(msg string, c Context)
func (*ContextError) AppendError ¶
func (ce *ContextError) AppendError(other *ContextError)
func (*ContextError) AppendString ¶
func (ce *ContextError) AppendString(msg string)
func (*ContextError) Error ¶
func (ce *ContextError) Error() string
func (*ContextError) GetObject ¶ added in v0.4.1
func (ce *ContextError) GetObject() interface{}
func (*ContextError) PrependContextString ¶
func (ce *ContextError) PrependContextString(msg string, c Context)
func (*ContextError) SetObject ¶ added in v0.4.1
func (ce *ContextError) SetObject(obj interface{})
func (*ContextError) ToHTML ¶
func (ce *ContextError) ToHTML() string
Click to show internal directories.
Click to hide internal directories.