Go supports nested struct inside function but no nested function except lambda, does it mean there is no way to define a nested class inside function?
func f() {
    // nested struct Cls inside f
    type Cls struct {
    ...
    }
    // try bounding foo to Cls but fail
    func (c *Cls) foo() {
    ...
    }
}
Thus it feels a bit strange that class is weaken inside function.
Any hints?
structis a struct type. Go doesn't have classes.classabove meansstructwith bounding function. Forgive my incorrect expression.