Check if the char is in station before printing the station name
This commit is contained in:
parent
1b601f2141
commit
c76fbc32a2
1 changed files with 6 additions and 1 deletions
7
main.go
7
main.go
|
@ -258,9 +258,14 @@ func printCharacterInformation(swaggerclient *ESI.App, m *Character) {
|
|||
|
||||
universeNames := getUniverseNames(swaggerclient, &itemIds)
|
||||
|
||||
stationName := ""
|
||||
if position.StationID != nil {
|
||||
stationName = universeNames[*position.StationID]
|
||||
}
|
||||
|
||||
fmt.Printf("Currently in %s - %s\n",
|
||||
universeNames[*position.SolarSystemID],
|
||||
universeNames[*position.StationID],
|
||||
stationName,
|
||||
)
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue