handlers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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 GetAllFiles

func GetAllFiles(pathname string, s []string) ([]string, error)

获取根目录下直属所有文件(不包括文件夹及其中的文件)

func GetAllJsonFile

func GetAllJsonFile(pathname string, s []string) ([]string, error)
	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 GetAllTextFile(pathname string, s []string) ([]string, error)

获取根目录下直属所有文件(不包括文件夹及其中的文件)

func GetAllYamlFile

func GetAllYamlFile(pathname string, s []string) ([]string, error)

获取根目录下直属所有文件(不包括文件夹及其中的文件)

func GetJsonFiles

func GetJsonFiles(folder string)

获取当前项目根目录下所有文件(包括文件夹中的文件)

func GetPathFiles

func GetPathFiles(folder string, suffix string) []string

获取当前项目根目录下所有文件(包括文件夹中的文件)

func GetTextFiles

func GetTextFiles(folder string)

获取当前项目根目录下所有文件(包括文件夹中的文件)

func GetYamlFiles

func GetYamlFiles(folder string)

获取当前项目根目录下所有文件(包括文件夹中的文件)

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 OpenTextFile(filepath string) error

func ParseTextLine

func ParseTextLine() error

func PlanContentParsing

func PlanContentParsing(filepath string) (helpers.PlanContent, error)

计划文件内容解析

func PlanContentSave

func PlanContentSave[T helpers.PlanContent](fileName string, conf *T) error

func PlanFilenameParsing

func PlanFilenameParsing(filename string) *helpers.PlanFilename

计划文件名解析

func ReadExcel

func ReadExcel()

读取 Excel 文档

func SaveExcel

func SaveExcel(filename string)

创建 Excel 文档

Types

This section is empty.

Jump to

Keyboard shortcuts

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