Minor: align VIN spelling

This commit is contained in:
andig 2021-08-02 18:35:01 +02:00
parent e8e5584003
commit c8ecbaabe5
3 changed files with 5 additions and 5 deletions

View file

@ -60,7 +60,7 @@ type VehiclesResponse struct {
}
type Vehicle struct {
Vin, VehicleName, VehicleID string
VIN, VehicleName, VehicleID string
}
func (v *API) Vehicles() ([]Vehicle, error) {

View file

@ -71,13 +71,13 @@ func NewHyundaiFromConfig(other map[string]interface{}) (api.Vehicle, error) {
log.DEBUG.Printf("found vehicle: %v", cc.VIN)
} else {
for _, v := range vehicles {
if v.Vin == strings.ToUpper(cc.VIN) {
if v.VIN == strings.ToUpper(cc.VIN) {
vehicle = v
}
}
}
if len(vehicle.Vin) == 0 {
if len(vehicle.VIN) == 0 {
return nil, fmt.Errorf("cannot find vehicle: %v", vehicles)
}

View file

@ -71,13 +71,13 @@ func NewKiaFromConfig(other map[string]interface{}) (api.Vehicle, error) {
log.DEBUG.Printf("found vehicle: %v", cc.VIN)
} else {
for _, v := range vehicles {
if v.Vin == strings.ToUpper(cc.VIN) {
if v.VIN == strings.ToUpper(cc.VIN) {
vehicle = v
}
}
}
if len(vehicle.Vin) == 0 {
if len(vehicle.VIN) == 0 {
return nil, fmt.Errorf("cannot find vehicle: %v", vehicles)
}