Documentation ¶
Index ¶
- func AppendExcelFileByFunction(excelFile string, columns []string, f func() [][]string)
- func CheckFileExists(filePath string) bool
- func CheckInput(tip string, choices ...string) (string, error)
- func GetAllFileNames(directoryPath string, deepIntoSubDirOrNot bool) ([]string, error)
- func GetNumbersFromString(str string) (string, error)
- func IsAllCharacterDigit(str string) bool
- func IsDirEmpty(name string) (bool, error)
- func LongestCommonSubstr(s1, s2 string) string
- func ReadExcelColumnNames(excelFile string, sheetName string, headerIndex int) ([]string, error)
- func ReadExcelFile(excelFile string, f func(int, []string) error, ignoreHeader bool) error
- func ReadExcelFileBySheetName(excelFile string, sheetName string, startFrom int, f func(int, []string) error) error
- func WriteExcelFile(excelFile string, headers []string, rows [][]string) error
- func WriteOrAppendExcelFile(excelFile string, headers []string, rows [][]string, append bool) error
- type LoggerWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendExcelFileByFunction ¶
AppendExcelFileByFunction 覆盖写数据到excel文件中
func CheckFileExists ¶
func GetAllFileNames ¶
func GetNumbersFromString ¶
func IsAllCharacterDigit ¶
func IsDirEmpty ¶
func LongestCommonSubstr ¶
LongestCommonSubstr 最长公共子串
func ReadExcelColumnNames ¶
ReadExcelColumnNames 获取excel文件指定sheetName的列标题,headerIndex是列标题所在行(从0开始)
func ReadExcelFile ¶
ReadExcelFile 读取电子表格的第一个sheet内容
func WriteExcelFile ¶
WriteExcelFile 覆盖写数据到excel文件中
Types ¶
type LoggerWriter ¶
type LoggerWriter struct {
// contains filtered or unexported fields
}
LoggerWriter 是一个实现了 io.Writer 接口的类型,它能够同时输出到终端和日志文件
func NewLoggerWriter ¶
func NewLoggerWriter(filename string) *LoggerWriter
NewLoggerWriter 创建并返回一个 LoggerWriter 对象
func (*LoggerWriter) Close ¶
func (lw *LoggerWriter) Close()
Click to show internal directories.
Click to hide internal directories.