31 lines
475 B
Go
31 lines
475 B
Go
package main
|
|
|
|
import (
|
|
"excel_export/biz/config"
|
|
"excel_export/biz/util"
|
|
"excel_export/cmd/cmd"
|
|
"github.com/tealeg/xlsx/v3"
|
|
"os"
|
|
"time"
|
|
)
|
|
|
|
var Config *config.Config
|
|
|
|
func main() {
|
|
p := util.NewProf()
|
|
defer func() {
|
|
p.Close()
|
|
}()
|
|
|
|
//设置默认格式
|
|
xlsx.DefaultDateTimeOptions = xlsx.DateTimeOptions{
|
|
Location: time.UTC,
|
|
ExcelTimeFormat: "yyyy-m-d h:mm:ss",
|
|
}
|
|
|
|
path, _ := os.Getwd()
|
|
Config = config.LoadConfig(path + "/config")
|
|
|
|
cmd.Execute()
|
|
}
|