fix(date): date == "" not != ""
This commit is contained in:
parent
a48cb45d05
commit
26e60ab2d4
2
main.go
2
main.go
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user