Skip to content

Commit

Permalink
Merge pull request #2929 from gophercloud/bp-v2-09ac067-66a938b
Browse files Browse the repository at this point in the history
[v2] change coding style
  • Loading branch information
pierreprinetti committed Feb 18, 2024
2 parents e6d0c15 + cb717c9 commit b11d9ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 2 additions & 4 deletions openstack/config/clouds/clouds.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,8 @@ func mergeInterfaces(overridingInterface, inferiorInterface interface{}) interfa
if !ok {
return overriding
}
for i := range list {
overriding = append(overriding, list[i])
}
return overriding

return append(overriding, list...)
case nil:
// mergeClouds(nil, map[string]interface{...}) -> map[string]interface{...}
v, ok := inferiorInterface.(map[string]interface{})
Expand Down
5 changes: 1 addition & 4 deletions params.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,7 @@ func isZero(v reflect.Value) bool {
return z
case reflect.Struct:
if v.Type() == reflect.TypeOf(t) {
if v.Interface().(time.Time).IsZero() {
return true
}
return false
return v.Interface().(time.Time).IsZero()
}
z := true
for i := 0; i < v.NumField(); i++ {
Expand Down

0 comments on commit b11d9ad

Please sign in to comment.