phelmkamp/metatag

Generate slice wrapper

Closed this issue · 1 comments

// file: a.go
type A struct {
    Name string
    Bs   []B `meta:"wrapper"`
}
// file: a_meta.go
type Bs struct {
    Bs []B
}

func (b Bs) Filter(fn func(B) bool, n int) Bs {
    // ...
}

// ...

Added wrapper directive but it doesn't generate a new type. Simply serves as shorthand for omitfield and chain.