-
Notifications
You must be signed in to change notification settings - Fork 0
/
welcome.go
75 lines (55 loc) · 895 Bytes
/
welcome.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package main
import (
"fmt"
"os"
"./trans"
)
var twoPi = 2 * trans.Pi
func main() {
greet := 3 > 1
const eight string = "8"
const SEVEN int = 7
var (
f int
g int = 3
num int = 20
)
num = 8
f = g
var (
a = os.Getenv("HOME")
b = os.Getenv("USER")
c = os.Getenv("GOROOT")
d = os.Getenv("GOOS")
)
type Color int
const (
RED Color = iota // 0
ORANGE // 1
YELLOW // 2
GREEN // ..
BLUE
INDIGO
VIOLET // 6
)
const LOW = iota + 50
if greet {
fmt.Println(a, b, c, d, LOW, SEVEN, num, eight, f, g)
}
fmt.Printf("2*Pi = %g\n", twoPi)
boo()
fmt.Printf("something more")
// for i := 0; i < 100; i++ {
// if i % 2 == 0 {
// fmt.Println(i)
// }
// }
foo()
}
func boo() {
var g int64 = 9223372036854775807
fmt.Println("I am in boo", g)
}
func foo() {
fmt.Println("Program exited")
}