Skip to content

Commit

Permalink
check for nil
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Apr 11, 2019
1 parent 8f04c4f commit 2eb3ea8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kubernetes/structures_pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ func flattenPodSpec(in v1.PodSpec) ([]interface{}, error) {
att["active_deadline_seconds"] = *in.ActiveDeadlineSeconds
}

att["automount_service_account_token"] = *in.AutomountServiceAccountToken
if in.AutomountServiceAccountToken != nil {
att["automount_service_account_token"] = *in.AutomountServiceAccountToken
}

containers, err := flattenContainers(in.Containers)
if err != nil {
Expand Down

0 comments on commit 2eb3ea8

Please sign in to comment.