This commit is contained in:
eson 2020-12-09 10:51:01 +08:00
parent ae467e40d9
commit 699b863837

View File

@ -23,8 +23,10 @@ type CountLiveAnchors struct {
}
func getArgsStartTime() time.Time {
date := flag.Arg(1)
flag.Parse()
date := flag.Arg(0)
if date == "" {
// log.Println(flag.)
panic("please input date eg. '2020-11-30 16:29:17'")
}
start, err := time.ParseInLocation("2006-01-02 15:04:03", date, time.Local)