Skip to content

Conversation

@EricMountain
Copy link
Member

@EricMountain EricMountain commented Nov 15, 2021

What type of PR is this?

What this PR does / why we need it:

See Go Operator Precedence.

package main

import (
	"fmt"
)

type DataDisk struct {
    Lun                     *int32                 `json:"lun,omitempty"`
}

func main() {
	var d DataDisk = DataDisk{}
	fmt.Printf("%v %v %d %v\n", false && false || false || true, d, d.Lun, d.Lun == nil)
}

https://play.golang.org/p/9r1y-5C99mr

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants