You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for raising this issue. This is working as intended. In Go it is perfectly valid to call a method on a nil receiver. This is by design and not a bug.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
What version of Go are you using (
go version
)?$ go version
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
With this code , the c.Door is not initial , the c.Door.Open() can be called .
when do the c.Door.ID = "test" , it is nil pointer error
What did you expect to see?
when call c.Door.Open() , should be nil pointer error .
What did you see instead?
the c.Door.Open() can be called
The text was updated successfully, but these errors were encountered: