package main
import (
"fmt"
)
func main() {
a := myFloats{1.0, 2.0, 3.0}
fmt.Println(a.First())
}
//go:generate pie myFloats.First
type myFloats []float64
yields
./myfloats_pie.go:5:11: ss.FirstOr undefined (type myFloats has no field or method FirstOr)
Currently, the developer hits this error and figures out they must explicitly ask for FirstOr:
//go:generate pie myFloats.First.FirstOr
It would be nice if Pie somehow knew it requires to generate FirstOras a dependency for First. I'm not saying this is trivial though, and also the inconvenience is minor.
yields
Currently, the developer hits this error and figures out they must explicitly ask for
FirstOr:It would be nice if Pie somehow knew it requires to generate
FirstOras a dependency forFirst. I'm not saying this is trivial though, and also the inconvenience is minor.