lean into examples
This commit is contained in:
9
examples/short-declarations/short-declarations.go
Normal file
9
examples/short-declarations/short-declarations.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
// `x := val` is shorthand for `var x type = val`.
|
||||
x := "Hello var"
|
||||
fmt.Println(x)
|
||||
}
|
||||
2
examples/short-declarations/short-declarations.sh
Normal file
2
examples/short-declarations/short-declarations.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
$ go run short-declarations.go
|
||||
Hello var
|
||||
Reference in New Issue
Block a user