Documentation ¶
Index ¶
- Variables
- func CmdParse(key string) (string, error)
- func CorrectInput(input string) string
- func CreateNewEmptyFile(file string) error
- func ExportStructureToFile(File string, Format string, structure interface{}) error
- func GetJSONFromElem(m interface{}, prettify bool) ([]byte, error)
- func GetJSONFromObj(m interface{}, prettify bool) []byte
- func GetXMLFromElem(m interface{}, prettify bool) ([]byte, error)
- func GetXMLFromObj(m interface{}, prettify bool) []byte
- func GetYAMLFromElem(m interface{}) ([]byte, error)
- func GetYAMLFromObj(m interface{}) []byte
- func IdToFileFormat(id string) string
- func IntToString(n int) string
- func NameToFileFormat(id string) string
- func NewByteStreamAsWriter(b []byte) *bufio.Writer
- func OptionsParse(key string, val string) (string, string, error)
- func PrintError(text string)
- func PrintImportant(text string)
- func PrintInfo(text string)
- func PrintSuccess(text string)
- func PrintWarning(text string)
- func PrintlnBoldError(text string)
- func PrintlnError(text string)
- func PrintlnImportant(text string)
- func PrintlnInfo(text string)
- func PrintlnSuccess(text string)
- func PrintlnWarning(text string)
- func ReduceStruct(field string, list []interface{}) ([]interface{}, error)
- func ReducedToIntsSlice(reduced []interface{}) []int
- func ReducedToStringsSlice(reduced []interface{}) []string
- func RequestConfirmation(reason string) bool
- func ReverseBytesArray(bytesArray []byte) []byte
- func ReverseString(str string) string
- func StrPad(instr string, capping int) string
- func StringToInt(s string) (int, error)
- func ToMap(m interface{}) map[string]interface{}
- type ByteStream
- func (buffer *ByteStream) Bytes() []byte
- func (buffer *ByteStream) Read(b []byte) (n int, err error)
- func (buffer *ByteStream) ReadAt(b []byte, off int64) (int, error)
- func (buffer *ByteStream) Reset()
- func (buffer *ByteStream) Seek(offset int64, whence int) (int64, error)
- func (buffer *ByteStream) String() string
- func (buffer *ByteStream) Write(b []byte) (n int, err error)
- func (buffer *ByteStream) WriteAt(b []byte, off int64) (int, error)
- func (buffer *ByteStream) WriteString(s string) (int, error)
- type Index
- func (element *Index) Compare(index Index) int
- func (element *Index) FromInt(value int, length int)
- func (element *Index) IsMaxValue() bool
- func (element *Index) IsZero() bool
- func (element *Index) New(size int)
- func (element *Index) Next() Index
- func (element *Index) Previous() Index
- func (element *Index) Subtract(index Index)
- func (element *Index) Sum(index Index)
Constants ¶
This section is empty.
Variables ¶
var INDEX_END byte = 122
var INDEX_START byte = 48
var NO_COLORS bool = false
Functions ¶
func CorrectInput ¶
func CreateNewEmptyFile ¶
func ExportStructureToFile ¶
func GetJSONFromElem ¶
go binary decoder
func GetXMLFromElem ¶
func GetXMLFromObj ¶
func GetYAMLFromElem ¶
func GetYAMLFromObj ¶
func GetYAMLFromObj(m interface{}) []byte
func IdToFileFormat ¶
func IntToString ¶
func NameToFileFormat ¶
func NewByteStreamAsWriter ¶
func PrintError ¶
func PrintError(text string)
func PrintImportant ¶
func PrintImportant(text string)
func PrintSuccess ¶
func PrintSuccess(text string)
func PrintWarning ¶
func PrintWarning(text string)
func PrintlnBoldError ¶
func PrintlnBoldError(text string)
func PrintlnError ¶
func PrintlnError(text string)
func PrintlnImportant ¶
func PrintlnImportant(text string)
func PrintlnInfo ¶
func PrintlnInfo(text string)
func PrintlnSuccess ¶
func PrintlnSuccess(text string)
func PrintlnWarning ¶
func PrintlnWarning(text string)
func ReduceStruct ¶
func ReducedToIntsSlice ¶
func ReducedToIntsSlice(reduced []interface{}) []int
func ReducedToStringsSlice ¶
func ReducedToStringsSlice(reduced []interface{}) []string
func RequestConfirmation ¶
func ReverseBytesArray ¶
func ReverseString ¶
func StringToInt ¶
Types ¶
type ByteStream ¶
type ByteStream struct {
// contains filtered or unexported fields
}
func NewByteStream ¶
func NewByteStream(b []byte) *ByteStream
func (*ByteStream) Bytes ¶
func (buffer *ByteStream) Bytes() []byte
func (*ByteStream) Read ¶
func (buffer *ByteStream) Read(b []byte) (n int, err error)
Read reads up to len(b) bytes from the ByteStream. It returns the number of bytes read and any error encountered. At end of file, Read returns 0, io.EOF.
func (*ByteStream) ReadAt ¶
func (buffer *ByteStream) ReadAt(b []byte, off int64) (int, error)
ReadAt reads len(b) bytes from the ByteStream starting at byte offset ofbuffer. It returns the number of bytes read and the error, if any. ReadAt always returns a non-nil error when n < len(b). At end of file, that error is io.EOF.
func (*ByteStream) Reset ¶
func (buffer *ByteStream) Reset()
func (*ByteStream) Seek ¶
func (buffer *ByteStream) Seek(offset int64, whence int) (int64, error)
Seek sets the offset for the next Read or Write on file to offset, interpreted according to whence: 0 means relative to the origin of the file, 1 means relative to the current offset, and 2 means relative to the end.
func (*ByteStream) String ¶
func (buffer *ByteStream) String() string
func (*ByteStream) Write ¶
func (buffer *ByteStream) Write(b []byte) (n int, err error)
Write writes len(b) bytes to the ByteStream. It returns the number of bytes written and an error, if any. Write returns a non-nil error when n != len(b).
func (*ByteStream) WriteAt ¶
func (buffer *ByteStream) WriteAt(b []byte, off int64) (int, error)
WriteAt writes len(b) bytes to the ByteStream starting at byte offset ofbuffer. It returns the number of bytes written and an error, if any. WriteAt returns a non-nil error when n != len(b).
func (*ByteStream) WriteString ¶
func (buffer *ByteStream) WriteString(s string) (int, error)
WriteString is like Write, but writes the contents of string s rather than a slice of bytes.