Remix.run Logo
jerf a day ago

Actually it's even easier in Go with struct embedding:

    type SmallerThing struct {
        Id     int
        Login  string
        IsAdmin bool
    }

    type UserController struct {
        SmallerThing
        OtherField  Whatever
        OtherField2 SomethingElse
    }
In principle this could break down if you need super, super complicated non-overlapping mappings, in practice I have yet to need that.