Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect logic in GetDiskLun() #47

Draft
wants to merge 1 commit into
base: release-1.19-dd-v1.19.9-dd.1
Choose a base branch
from

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.

1 participant