func (r rect) perim() int {
	return 2*r.width + 2*r.height
}
Methods can be defined for either pointer or value
receiver types. Here's an example of a value receiver.
package main
import "fmt"
type rect struct {
	width, height int
}
func (r *rect) area() int {
	return r.width * r.height
}