MCPcopy Create free account
hub / github.com/Go-Learning-Land/Go-Learning-Archive / main

Function main

GolangBasics/GoByExample/003Variables.go:5–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import "fmt"
4
5func main() {
6
7 var a = "initial" // var a string = "initial" same as example
8 fmt.Println(a)
9
10 var b, c int = 1, 2 // also same as var b,c = 1,2
11 fmt.Println(b, c)
12
13 var d = true
14 fmt.Println(d)
15
16 var e int
17 fmt.Println(e)
18
19 f := "apple" // short declaration use for declaring and initializing a variable,
20 fmt.Println(f)
21}

Callers

nothing calls this directly

Calls 1

PrintlnMethod · 0.80

Tested by

no test coverage detected