//go:generate genny -in=$GOFILE -out=$GOFILE_gen gen "Datatype=string,int"
type Datatype generic.Type
type GetterDatatype interface {
GetDataType(column string) (DataType, err)
}
type HasGetters interface {
GetterDatatype
}
To expand into
type GetterInt interface {
GetInt(column string) (int, err)
}
type GetterString interface {
GetString(column string) (string, err)
}
type HasGetters interface {
GetterInt
GetterString
}
But, of course, it doesn't. Is this a worthy enhancement? Is there a workaround to define HasGetters (other than knowing ahead of time what the datatypes are)?
I would like
To expand into
But, of course, it doesn't. Is this a worthy enhancement? Is there a workaround to define HasGetters (other than knowing ahead of time what the datatypes are)?