index work

This commit is contained in:
Mark McGranaghan 2012-09-23 14:54:59 -07:00
parent 1c63eb272c
commit 434392e67c
100 changed files with 5 additions and 32 deletions

View File

@ -1,12 +0,0 @@
// ## Recover
package main
import "fmt"
func main() {
defer func() {
fmt.Println("Preparing for trouble...\n")
}()
panic("Trouble!")
}

View File

@ -20,3 +20,5 @@ func main() {
cOrdered := Circle{1, 2, 5}
fmt.Println(cOrdered)
}
// todo: add field access

View File

@ -1,17 +0,0 @@
// ## Struct Fields
package main
import "fmt"
type Circle struct {
x, y, r int
}
func main() {
c := Circle{x: 1, y: 2, r: 5}
fmt.Println(c.x, c.y, c.r)
c.x = 10
c.y = 5
fmt.Println(c.x, c.y, c.r)
}

View File

@ -18,3 +18,5 @@ func main() {
fmt.Println(name)
}
}
// todo: note about use with errors

View File

@ -22,16 +22,14 @@ closures
recursion
defer
panic
recover
pointers
new
structs
struct-fields
methods
embedding
interfaces
ok-guards
errors
ok-guards
~ comments
# concurrency