Conversation
| "run `gowrap template list` for details") | ||
| fs.Var(&gc.vars, "v", "a key-value pair to parametrize the template,\narguments without an equal sign are treated as a bool values,\ni.e. -v foo=bar -v disableChecks") | ||
| fs.StringVar(&gc.localPrefix, "l", "", "put imports beginning with this string after 3rd-party packages; comma-separated list") | ||
| fs.StringVar(&gc.ignoreMethod, "ignore_method", "", "ignore method") |
There was a problem hiding this comment.
Let's make it boolean flag. Because I don't think people will be picking methods to ignore, most likely these will be just all unexported methods to ignore.
fs.BoolVar(&gc.ignoreUnexported, "u", false, "ignore unexported methods")|
any news? |
|
@hexdigest if gowrap no support unexported methods, why not just skip it by default without flags? In my opinion flag to skip make sense in case gowrap generate unexported methods too |
It's not that gowrap does not support unexported methods its about where the generated wrapper is placed. Because there's clearly a use case for generating wrapper with unexported methods if the wrapper is placed within the same package where the interface with unexported method is defined and being called and/or type asserted. Also conceptually these are two different interfaces and the user has to have a clear understanding on what's going on so the unexported method can't just be ignored, there should be an explicit flag for that. |
grpc server stub has
mustEmbedUnimplementedScannerServiceServermethod, gowrap will failedunexported method, ignore it.