Documentation ¶
Index ¶
- Constants
- func Bytes2TreeStruct(b [][]byte) []*strategy.TreeStruct
- func Bytes2str(b []byte) string
- func Bytes2string(b []byte) string
- func SlicePlace(find byte, slice []byte) int
- func SplitSlice(num int, a []string) [][]string
- func Str2bytes(s string) []byte
- func String2bytes(s string) []byte
- func TreeStruct2Bytes(treeList []*strategy.TreeStruct) [][]byte
Constants ¶
View Source
const ( //data file type,0,file default type DataType = iota //ini file type, 1 IniType //yaml file type, 2 YamlType //json file type,3 JsonType )
* * this file const are golbal const for all data,import the package like "import . common"
View Source
const ( //data file suffix DataSuffix = ".data" //ini file suffix IniSuffix = ".conf" //json file suffix JsonSuffix = ".json" //yaml file suffix YamlSuffix = ".yaml" )
View Source
const ( //left bracket, this data for turn tree data to string data LeftBracket rune = '[' //right bracket,this data for turn tree data to string data RightBracket rune = ']' //right rance,this data for turn tree data to string data LeftRance rune = '{' RightRance rune = '}' Colon rune = ':' Comma rune = ',' None rune = 'N' Slash rune = '/' Hash rune = '#' Asterisk rune = '*' LineBreak rune = '\n' Blank rune = ' ' Period rune = '.' )
View Source
const ( BindTag = "bind" JsonTag = "json" )
Variables ¶
This section is empty.
Functions ¶
func Bytes2TreeStruct ¶
func Bytes2TreeStruct(b [][]byte) []*strategy.TreeStruct
func Bytes2string ¶
func SlicePlace ¶
func SplitSlice ¶
* * cut slice, turn the one dimensional silce to double dimensional slice
func String2bytes ¶
func TreeStruct2Bytes ¶
func TreeStruct2Bytes(treeList []*strategy.TreeStruct) [][]byte
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.