8000 adds another example to package · Abhicodeitout/GolangTraining@755b29a · GitHub
[go: up one dir, main page]

Skip to content

Commit 755b29a

Browse files
committed
adds another example to package
1 parent 1c491d5 commit 755b29a

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

02_package/icomefromalaska/name2.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package winniepooh
2+
3+
// MyName will be exported because it starts with a capital letter.
4+
var BearName = "Pooh"

02_package/main/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ package main
33
import (
44
"fmt"
55
"github.com/GoesToEleven/GolangTraining/02_package/stringutil"
6+
"github.com/GoesToEleven/GolangTraining/02_package/icomefromalaska"
67
)
78

89
func main() {
910
fmt.Println(stringutil.Reverse("!oG ,olleH"))
1011
fmt.Println(stringutil.MyName)
12+
fmt.Println(winniepooh.BearName)
1113
}

27_code-in-process/97_temp/02/02

1.53 MB
Binary file not shown.

27_code-in-process/97_temp/02/main.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
)
6+
7+
func init() {
8+
fmt.Println("Who ran first?", x)
9+
}
10+
11+
func main() {
12+
fmt.Println("Hello world.")
13+
}
14+
15+
var x int = 17

0 commit comments

Comments
 (0)
0