lean into examples
This commit is contained in:
13
examples/constants/constants.go
Normal file
13
examples/constants/constants.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Use `const` to declare a constant value.
|
||||
// Constants can be ...
|
||||
const x string = "Hello World"
|
||||
|
||||
func main() {
|
||||
fmt.Println(x)
|
||||
}
|
||||
|
||||
// todo: research
|
||||
2
examples/constants/constants.sh
Normal file
2
examples/constants/constants.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
$ go run constant.go
|
||||
Hello World
|
||||
Reference in New Issue
Block a user