This can be written more neatly by assigning an anonymous function, as `var getter = func(url string) (data []byte, err error) { ...`.