@@ -131,7 +131,8 @@ func callAndUnmarshal(client *http.Client, page int, data *APICalendarResponse)
131131// getTime parses the start and end time of the event
132132func getTime (event RawEvent ) (time.Time , time.Time ) {
133133 instance := convert [map [string ]any ](
134- convert [map [string ]any ](convert [[]any ](event .Event ["event_instances" ])[0 ])["event_instance" ])
134+ convert [map [string ]any ](
135+ convert [[]any ](event .Event ["event_instances" ])[0 ])["event_instance" ])
135136
136137 // Converts RFC3339 timestamp string to time.Time
137138 startTime , err := time .Parse (time .RFC3339 , convert [string ](instance ["start" ]))
@@ -163,28 +164,28 @@ func getEventLocation(event RawEvent) string {
163164
164165// getFilters parses the types, topics, and target audiences
165166func getFilters (event RawEvent ) ([]string , []string , []string ) {
166- eventTypes := []string {}
167- targetAudiences := []string {}
168- eventTopics := []string {}
167+ types := []string {}
168+ audiences := []string {}
169+ topics := []string {}
169170
170171 filters := convert [map [string ]any ](event .Event ["filters" ])
171172
172173 rawTypes := convert [[]any ](filters ["event_types" ])
173174 for _ , rawType := range rawTypes {
174- eventTypes = append (eventTypes , convert [string ](convert [map [string ]any ](rawType )["name" ]))
175+ types = append (types , convert [string ](convert [map [string ]any ](rawType )["name" ]))
175176 }
176177
177178 rawAudiences := convert [[]any ](filters ["event_target_audience" ])
178179 for _ , audience := range rawAudiences {
179- targetAudiences = append (targetAudiences , convert [string ](convert [map [string ]any ](audience )["name" ]))
180+ audiences = append (audiences , convert [string ](convert [map [string ]any ](audience )["name" ]))
180181 }
181182
182183 rawTopics := convert [[]any ](filters ["event_topic" ])
183184 for _ , topic := range rawTopics {
184- eventTopics = append (eventTopics , convert [string ](convert [map [string ]any ](topic )["name" ]))
185+ topics = append (topics , convert [string ](convert [map [string ]any ](topic )["name" ]))
185186 }
186187
187- return eventTypes , targetAudiences , eventTopics
188+ return types , audiences , topics
188189}
189190
190191// getDepartmentsAndTags parses the departments, and tags
0 commit comments