package api import ( "os" "path/filepath" ) // getExeFilename func getExeFilename() string { _, logfilename := filepath.Split(os.Args[0]) if logfilename == "" { panic("get exe filename failed") } return logfilename }