From 4719be9c13eb24e4a61eb48e9595b141851cd875 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Mon, 8 Apr 2024 20:31:04 +0100 Subject: [PATCH] Remove omitempty from boolean values --- pkg/database/timetable.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/database/timetable.go b/pkg/database/timetable.go index acdb70a..da8d266 100644 --- a/pkg/database/timetable.go +++ b/pkg/database/timetable.go @@ -9,7 +9,7 @@ type Stop struct { WttDeparture string `json:"wttDeparture,omitempty"` PublicArrival string `json:"publicArrival,omitempty"` WttArrival string `json:"wttArrival,omitempty"` - IsPublic bool `json:"isPublic,omitempty"` + IsPublic bool `json:"isPublic"` // Ensure omitempty is not set Tiploc string `json:"tiploc,omitempty"` Pass string `json:"pass,omitempty"` Platform string `json:"platform,omitempty"` @@ -28,9 +28,9 @@ type Service struct { // Consider including catering, train class etc. here too. PlanSpeed int32 `json:"planSpeed,omitempty"` ScheduleStartDate time.Time `json:"scheduleStartDate,omitempty"` ScheduleEndDate time.Time `json:"scheduleEndDate,omitempty"` - FirstClass bool `json:"firstClass,omitempty"` - Catering bool `json:"catering,omitempty"` - Sleeper bool `json:"sleeper,omitempty"` + FirstClass bool `json:"firstClass"` // Ensure omitempty is not set + Catering bool `json:"catering"` // Ensure omitempty is not set + Sleeper bool `json:"sleeper"` // Ensure omitempty is not set DaysRun []string `json:"daysRun,omitempty"` Stops []Stop `json:"stops,omitempty"` }