publish constants and for

This commit is contained in:
Mark McGranaghan
2012-10-17 13:25:27 -07:00
parent 777c529caa
commit 1632105ca8
6 changed files with 36 additions and 29 deletions

View File

@@ -1,13 +1,13 @@
// Go supports _constants_ of character, string, boolean,
// and numeric values.
package main
import "fmt"
// Use `const` to declare a constant value.
// Constants can be ...
const x string = "Hello World"
const s string = "Constant"
func main() {
fmt.Println(x)
fmt.Println(s)
}
// todo: research

View File

@@ -1,2 +1,3 @@
$ go run constant.go
Hello World
Constant