Skip to content

Commit

Permalink
Fix bool pointers conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
pdecat committed Oct 26, 2017
1 parent 4d5f5d9 commit 21b00d3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kubernetes/structures_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func flattenConfigMapRef(in *v1.ConfigMapEnvSource) []interface{} {
att["name"] = in.Name
}
if in.Optional != nil {
att["optional"] = in.Optional
att["optional"] = *in.Optional
}
return []interface{}{att}
}
Expand Down Expand Up @@ -224,7 +224,7 @@ func flattenSecretRef(in *v1.SecretEnvSource) []interface{} {
att["name"] = in.Name
}
if in.Optional != nil {
att["optional"] = in.Optional
att["optional"] = *in.Optional
}
return []interface{}{att}
}
Expand Down Expand Up @@ -846,8 +846,8 @@ func expandSecretRef(r []interface{}) (*v1.SecretEnvSource, error) {
if v, ok := in["name"].(string); ok {
obj.Name = v
}
if v, ok := in["optional"].(bool); ok {
obj.Optional = ptrToBool(v)
if v, ok := in["optional"]; ok {
obj.Optional = ptrToBool(v.(bool))
}

return obj, nil
Expand Down Expand Up @@ -915,8 +915,8 @@ func expandConfigMapRef(r []interface{}) (*v1.ConfigMapEnvSource, error) {
if v, ok := in["name"].(string); ok {
obj.Name = v
}
if v, ok := in["optional"].(bool); ok {
obj.Optional = ptrToBool(v)
if v, ok := in["optional"]; ok {
obj.Optional = ptrToBool(v.(bool))
}

return obj, nil
Expand Down

0 comments on commit 21b00d3

Please sign in to comment.