common

package
v0.0.0-...-0cd90d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 Bytes2str

func Bytes2str(b []byte) string

func Bytes2string

func Bytes2string(b []byte) string

func SlicePlace

func SlicePlace(find byte, slice []byte) int

func SplitSlice

func SplitSlice(num int, a []string) [][]string

* * cut slice, turn the one dimensional silce to double dimensional slice

func Str2bytes

func Str2bytes(s string) []byte

func String2bytes

func String2bytes(s string) []byte

func TreeStruct2Bytes

func TreeStruct2Bytes(treeList []*strategy.TreeStruct) [][]byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL