summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/main.go b/main.go
index d7c5f7b..947bc90 100644
--- a/main.go
+++ b/main.go
@@ -2,6 +2,20 @@ package main
import "fmt"
+var g *int
+
+func first() {
+ a := 1
+ g = &a
+}
+
+func second() {
+ b := 2
+ _ = b
+}
func main() {
+ first()
+ second()
+ fmt.Print(*g, "\n")
fmt.Print("Hello, Zed!\n")
}