Documentation
¶
Index ¶
- Variables
- func GetAllJsonFile(pathname string, s []string) ([]string, error)
- func GetAllTextFile(pathname string, s []string) ([]string, error)
- func GetAllYamlFile(pathname string, s []string) ([]string, error)
- func GetJsonFiles(folder string)
- func GetTextFiles(folder string)
- func GetYamlFiles(folder string)
- func InsertDataLine(rowData []interface{})
- func InsertJsonHeaderLine()
- func InsertJsonPathLine(filepath string)
- func InsertTextHeaderLine()
- func InsertTextPathLine(filepath string)
- func OpenTextFile(filepath string) error
- func ParseTextLine() error
- func ReadExcel()
- func SaveExcel(filename string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TextPathList []string LineArray [4]string )
View Source
var ( YamlPathList []string YamlReader *bufio.Reader )
View Source
var (
JsonPathList []string
)
Functions ¶
func GetAllJsonFile ¶
jsonFile, err := os.Open("tests/touch_log.json")
if err != nil {
fmt.Println("error opening json file")
return
}
defer jsonFile.Close()
jsonData, err := ioutil.ReadAll(jsonFile)
if err != nil {
fmt.Println("error reading json file")
return
}
keys := make([]PublicKey, 0)
err = json.Unmarshal([]byte(jsonData), &keys)
if err == nil {
fmt.Printf("%+v\n", keys)
fmt.Printf("~~~~~~:%+v\n", keys[0].Id)
} else {
fmt.Println(err)
fmt.Printf("%+v\n", keys)
}
}
获取根目录下直属所有文件(不包括文件夹及其中的文件)
func GetAllTextFile ¶
获取根目录下直属所有文件(不包括文件夹及其中的文件)
func GetAllYamlFile ¶
获取根目录下直属所有文件(不包括文件夹及其中的文件)
func InsertDataLine ¶
func InsertDataLine(rowData []interface{})
func InsertJsonHeaderLine ¶
func InsertJsonHeaderLine()
func InsertJsonPathLine ¶
func InsertJsonPathLine(filepath string)
func InsertTextHeaderLine ¶
func InsertTextHeaderLine()
func InsertTextPathLine ¶
func InsertTextPathLine(filepath string)
func OpenTextFile ¶
func ParseTextLine ¶
func ParseTextLine() error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.