x
is an untyped constant
representable
by a value of type T
.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/a20a7034-19c3-410a-bc86-25deff38534f%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAK_MaNuSTSGGummC5cOyh%2BbR9VCovrX3xHamDLixDUWbk010Dw%40mail.gmail.com.
package enum
import "fmt"
type Status struct {
s string
}
var One = Status{"one"}
var Two = Status{"two"}
func PrintIt(stat Status) {
fmt.Println("Status is", stat.s)
}
func Foo() {
enum.One = enum.Two
enum.PrintIt(enum.One)
}
Which will print "two", and perminantly alter the meaning of enum.One.
To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/9df8504c-4309-43ab-86ee-518b52eb2e2f%40googlegroups.com.