-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update gates lookup to export is current data; update compiled gates …
…data; improved docs
- Loading branch information
thisisaaronland
committed
Sep 28, 2021
1 parent
8ed85f6
commit ccbe8e3
Showing
6 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
compile-gates: | ||
go run -mod vendor cmd/compile-gates-data/main.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
// package gates provides methods for working with boarding gates at SFO. | ||
package gates | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
// type Gate is a struct representing a passenger gate at SFO. | ||
type Gate struct { | ||
// The Who's On First ID associated with this gate. | ||
WhosOnFirstId int64 `json:"wof:id"` | ||
// The name of this gate. | ||
Name string `json:"wof:name"` | ||
// A Who's On First "existential" (`KnownUnknownFlag`) flag signaling the gate's status | ||
IsCurrent string `json:"mz:is_current"` | ||
} | ||
|
||
// String() will return the name of the gate. | ||
func (g *Gate) String() string { | ||
return g.Name | ||
return fmt.Sprintf("%d %s (%s)", g.WhosOnFirstId, g.Name, g.IsCurrent) | ||
} |