more index work

This commit is contained in:
Mark McGranaghan
2012-09-23 14:38:39 -07:00
parent 3474d39dc5
commit c19a29193e
112 changed files with 8 additions and 39 deletions

View File

@@ -0,0 +1,17 @@
// ## 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)
}