Documentation ¶ Index ¶ func Perimeter(rectangle Rectangle) float64 type Circle func (c Circle) Area() float64 type Person func NewPerson() Person func NewPersonPointer() *Person func NewPersonPointer2() *Person type Rectangle func (r Rectangle) Area() float64 type Shape type Triangle func (t Triangle) Area() float64 Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Perimeter ¶ func Perimeter(rectangle Rectangle) float64 Types ¶ type Circle ¶ type Circle struct { Radius float64 } func (Circle) Area ¶ func (c Circle) Area() float64 type Person ¶ type Person struct { AgeYears int Name string Friends []Person } func NewPerson ¶ func NewPerson() Person func NewPersonPointer ¶ func NewPersonPointer() *Person func NewPersonPointer2 ¶ func NewPersonPointer2() *Person type Rectangle ¶ type Rectangle struct { Width float64 Height float64 } func (Rectangle) Area ¶ func (r Rectangle) Area() float64 type Shape ¶ type Shape interface { Area() float64 } type Triangle ¶ type Triangle struct { Base float64 Height float64 } func (Triangle) Area ¶ func (t Triangle) Area() float64 Source Files ¶ View all Source files structs.go Click to show internal directories. Click to hide internal directories.