fix(date): date == "" not != ""

This commit is contained in:
eson 2020-12-09 10:49:20 +08:00
parent a48cb45d05
commit 26e60ab2d4

View File

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