index work
This commit is contained in:
parent
4fc6a1c9a7
commit
9ef3140839
@ -1,14 +1,11 @@
|
||||
// ## Literals
|
||||
// ## Inline Assignment
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
|
||||
// `x := val` is shorthand for `var x type = val`.
|
||||
x := "Hello literal"
|
||||
x := "Hello assignment"
|
||||
fmt.Println(x)
|
||||
}
|
||||
|
||||
// todo: literal term?
|
2
004-inline-assignment/inline-assignment.sh
Normal file
2
004-inline-assignment/inline-assignment.sh
Normal file
@ -0,0 +1,2 @@
|
||||
$ go run inline-assignment.go
|
||||
Hello assignment
|
@ -1,2 +0,0 @@
|
||||
$ go run literal.go
|
||||
Hello literal
|
@ -1,2 +0,0 @@
|
||||
$ go run case.go
|
||||
Write 3 as three
|
@ -1,4 +1,4 @@
|
||||
// ## Case
|
||||
// ## Switch
|
||||
|
||||
package main
|
||||
|
2
008-switch/switch.sh
Normal file
2
008-switch/switch.sh
Normal file
@ -0,0 +1,2 @@
|
||||
$ go run switch.go
|
||||
Write 3 as three
|
@ -6,11 +6,11 @@
|
||||
hello-world
|
||||
values
|
||||
variables
|
||||
literals
|
||||
inline-assignment
|
||||
constants
|
||||
for
|
||||
if-else
|
||||
case
|
||||
switch
|
||||
arrays
|
||||
range
|
||||
slices
|
||||
|
Loading…
x
Reference in New Issue
Block a user