use time keyword constant
This commit is contained in:
@@ -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
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user