use time keyword constant

This commit is contained in:
zhiqiang feng
2021-01-05 18:11:51 +08:00
parent 99440a393a
commit a814a2190a
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -39,7 +39,6 @@ const (
KeyDof = "dof" KeyDof = "dof"
KeyPlane = "plane" KeyPlane = "plane"
KeyAircraft = "aircraft" KeyAircraft = "aircraft"
KeyOther = "other"
KeyTime = "time" KeyTime = "time"
) )
+1 -1
View File
@@ -107,7 +107,7 @@ func parseAirportAndTime(s string) (airport string, arrivalTime time.Time) {
func parseDof(text string) time.Time { func parseDof(text string) time.Time {
value := getFields(DofValueRex, text) value := getFields(DofValueRex, text)
dof, _ := time.Parse("060102", value["time"]) dof, _ := time.Parse("060102", value[KeyTime])
return dof return dof
} }