GitBucket
4.23.0
Toggle navigation
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
sample-golang
/
01_hello
Browse code
add type sample
master
1 parent
77e200d
commit
9bfaab4911f2b969f50be30ab673503af2363a8b
yhornisse
authored
on 21 Sep 2021
Patch
Showing
1 changed file
type.go
Ignore Space
Show notes
View
type.go
0 → 100644
package main import "fmt" type A int64 type B int64 func main() { var i int64 = 1 var a1 A = 1 var a2 A = 1 var b1 B = 1 fmt.Printf("%d %d %d %d %d\n", i, int64(a1), a1, a2, b1) fmt.Printf("a1 == 1: %+v\n", a1 == 1) //fmt.Printf("a1 == i: %+v\n", a1 == i) fmt.Printf("int64(a1) == i: %+v\n", int64(a1) == i) fmt.Printf("a1 == a2: %+v\n", a1 == a2) //fmt.Printf("a1 == b1: %+v\n", a1 == b1) }
Show line notes below