23 lines
504 B
Go
23 lines
504 B
Go
|
package corpus
|
||
|
|
||
|
import "git.fjla.uk/owlboard/go-types/pkg/database"
|
||
|
|
||
|
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
|
||
|
}
|