gofmt wat u know about it

This commit is contained in:
Mark McGranaghan
2012-09-23 18:31:33 -07:00
parent f93bdba75c
commit 89f95f2ac5
66 changed files with 729 additions and 678 deletions

View File

@@ -10,7 +10,7 @@ type Circle struct {
}
func (c *Circle) area() float64 {
return math.Pi * c.r*c.r
return math.Pi * c.r * c.r
}
type Rectangle struct {
@@ -30,10 +30,10 @@ func (r *Rectangle) area() float64 {
}
func main() {
circle := Circle{x: 0, y: 3, r: 5}
fmt.Println(circle.area())
rectangle := Rectangle {x1: 3, x2: 10, y1: 5, y2: 7}
fmt.Println(rectangle.area())
circle := Circle{x: 0, y: 3, r: 5}
fmt.Println(circle.area())
rectangle := Rectangle{x1: 3, x2: 10, y1: 5, y2: 7}
fmt.Println(rectangle.area())
}
// todo: pointer vs value receivers