Documentation ¶
Index ¶
- Variables
- func CloneStringMap(m map[string]string) map[string]string
- func InitStdinReader() chan interface{}
- func MakeError(errInfo string) error
- func MakeErrorChain(errInfo string, extErr error) error
- func SplitStringEx(s string, sep byte) []string
- func SplitStringN(s string, sep byte, n int) []string
- func UnescapeBytes(dest []byte, src []byte) []byte
- func UnescapeStr(s string) string
- func WriteStdinInput(str string) error
- func WriteStdinInputCB(str string, callback func(string) error) error
- type ChainError
- type GenericError
- type InputObj
- type List
- type ListElement
- type TraceReader
- type TraceReaderWriter
- func (rw *TraceReaderWriter) Read(buf []byte) (int, error)
- func (rw *TraceReaderWriter) TraceBackRead(offset int) ([]byte, error)
- func (rw *TraceReaderWriter) TraceBackWrite(offset int) ([]byte, error)
- func (rw *TraceReaderWriter) TraceCountRead() int
- func (rw *TraceReaderWriter) TraceCountWrite() int
- func (rw *TraceReaderWriter) Write(buf []byte) (int, error)
- type TraceWriter
- type UUID
Constants ¶
This section is empty.
Variables ¶
var ( // NullUUID a zero value uuid NullUUID = MakeUUID(0, 0, 0, 0) )
Functions ¶
func InitStdinReader ¶
func InitStdinReader() chan interface{}
func MakeErrorChain ¶
MakeErrorChain creates new error chain
func SplitStringEx ¶
SplitStringEx split string into []string, unescape each escaped string
func SplitStringN ¶
SplitStringN split string into []string with maximum length n
func UnescapeBytes ¶
func WriteStdinInput ¶
Types ¶
type ChainError ¶
type ChainError struct {
// contains filtered or unexported fields
}
ChainError - generic chained error information
func (*ChainError) Error ¶
func (e *ChainError) Error() string
type GenericError ¶
type GenericError struct {
// contains filtered or unexported fields
}
GenericError - generic error information
func (*GenericError) Error ¶
func (e *GenericError) Error() string
type List ¶
type List struct {
// contains filtered or unexported fields
}
List container object
func (*List) PopFront ¶
func (l *List) PopFront() *ListElement
PopFront removes first element from the list, and keep the element available, user still can iterate the list removed element keeps the list nodes, users who keeps the element will cause memory leak
func (*List) PushBack ¶
func (l *List) PushBack(v interface{}) *ListElement
PushBack append a new element at the tail
func (*List) Remove ¶
func (l *List) Remove(e *ListElement) *ListElement
Remove removes e from its list, and keep the element available, user still can iterate the list removed element keeps the list nodes, users who keeps the element will cause memory leak
type ListElement ¶
type ListElement struct { Value interface{} // contains filtered or unexported fields }
ListElement - list node element
func (*ListElement) Next ¶
func (e *ListElement) Next() *ListElement
Next iterate to next sibling element
func (*ListElement) Prev ¶
func (e *ListElement) Prev() *ListElement
Prev iterate to previous sibling element
type TraceReader ¶
type TraceReader struct {
// contains filtered or unexported fields
}
func WrapTraceReader ¶
func WrapTraceReader(r io.Reader) *TraceReader
func WrapTraceReaderEx ¶
func WrapTraceReaderEx(r io.Reader, cacheSize int, opQueueSize int) *TraceReader
func (*TraceReader) TraceCount ¶
func (tr *TraceReader) TraceCount() int
type TraceReaderWriter ¶
type TraceReaderWriter struct {
// contains filtered or unexported fields
}
func TraceWrapReaderWriter ¶
func TraceWrapReaderWriter(rw io.ReadWriter) *TraceReaderWriter
func (*TraceReaderWriter) TraceBackRead ¶
func (rw *TraceReaderWriter) TraceBackRead(offset int) ([]byte, error)
func (*TraceReaderWriter) TraceBackWrite ¶
func (rw *TraceReaderWriter) TraceBackWrite(offset int) ([]byte, error)
func (*TraceReaderWriter) TraceCountRead ¶
func (rw *TraceReaderWriter) TraceCountRead() int
func (*TraceReaderWriter) TraceCountWrite ¶
func (rw *TraceReaderWriter) TraceCountWrite() int
type TraceWriter ¶
type TraceWriter struct {
// contains filtered or unexported fields
}
func WrapTraceWriter ¶
func WrapTraceWriter(w io.Writer) *TraceWriter
func WrapTraceWriterEx ¶
func WrapTraceWriterEx(w io.Writer, cacheSize int, opQueueSize int) *TraceWriter
func (*TraceWriter) TraceCount ¶
func (tr *TraceWriter) TraceCount() int
type UUID ¶
type UUID struct {
// contains filtered or unexported fields
}
UUID unique id type
func ParseUUIDEx ¶
func (*UUID) MarshalJSON ¶
MarshalJSON serialize UUID into JSON bytes
func (*UUID) UnmarshalJSON ¶
UnmarshalJSON deserialize UUID object from JSON bytes