index work
This commit is contained in:
parent
4fc6a1c9a7
commit
9ef3140839
@ -1,14 +1,11 @@
|
|||||||
// ## Literals
|
// ## Inline Assignment
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
// `x := val` is shorthand for `var x type = val`.
|
// `x := val` is shorthand for `var x type = val`.
|
||||||
x := "Hello literal"
|
x := "Hello assignment"
|
||||||
fmt.Println(x)
|
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
|
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
|
hello-world
|
||||||
values
|
values
|
||||||
variables
|
variables
|
||||||
literals
|
inline-assignment
|
||||||
constants
|
constants
|
||||||
for
|
for
|
||||||
if-else
|
if-else
|
||||||
case
|
switch
|
||||||
arrays
|
arrays
|
||||||
range
|
range
|
||||||
slices
|
slices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user