package corpus import "git.fjla.uk/owlboard/go-types/pkg/database" // Removes non-station entities from the CORPUS Data, ready for insertion to the database (stations collection) func createStationEntries(corpusData *[]database.CorpusEntry) *[]database.StationEntry { var stationEntries []database.StationEntry for _, entry := range *corpusData { if entry.CRS != "" { stationEntry := database.StationEntry{ CRS: entry.CRS, TIPLOC: entry.TIPLOC, NLCDESC: entry.NLCDESC, STANOX: entry.STANOX, } stationEntries = append(stationEntries, stationEntry) } } return &stationEntries }