aboutsummaryrefslogtreecommitdiff
path: root/pkg/adapters/yaml
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/adapters/yaml')
-rw-r--r--pkg/adapters/yaml/yaml.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/pkg/adapters/yaml/yaml.go b/pkg/adapters/yaml/yaml.go
index 9a79a72..9304c8f 100644
--- a/pkg/adapters/yaml/yaml.go
+++ b/pkg/adapters/yaml/yaml.go
@@ -16,8 +16,6 @@ import (
"gopkg.in/yaml.v3"
)
-// ---------- Data model ----------
-
type FareInfo struct {
Class string `yaml:"CLASS" json:"class"`
Fare string `yaml:"FARE" json:"fare"`
@@ -34,13 +32,12 @@ type Schedule struct {
data map[string]map[string]Flight
}
-// ParseSchedule reads YAML from r into a Schedule.
func ParseSchedule(r io.Reader) (*Schedule, error) {
s := &Schedule{
data: make(map[string]map[string]Flight),
}
dec := yaml.NewDecoder(r)
- // dec.KnownFields(true) // enable if you want strict field checking
+ // dec.KnownFields(true) // strict field checking
if err := dec.Decode(&s.data); err != nil {
return nil, err
}