hexdigest / gowrap

GoWrap is a command line tool for generating decorators for Go interfaces
MIT License
1.06k stars 82 forks source link

method.Declaration does not add package names in argument types and return types #62

Closed zshehov closed 1 year ago

zshehov commented 1 year ago

The func (_d {{$decorator}}) {{$method.Declaration}} { line generates

func (_d wrapped) Method(ctx context.Context, paramName ParamType) (returnName ReturnType) instead of the expected func (_d wrapped) Method(ctx context.Context, paramName wrappedtype.ParamType) (returnName wrappedtype.ReturnType)

This change in behaviour has happened between release 1.2.7 and 1.3.0

rangzen commented 1 year ago

Hello @hexdigest, any news on this one? We force 1.2.7 right now.

hexdigest commented 1 year ago

@zshehov @rangzen

Hey folks, I reverted generics feature since it introduced some major issues. You can try latest v1.3.1 release

cc @NoGambiNoBugs

NoGambiNoBugs commented 1 year ago

@hexdigest I will test this case, is true that the generics feature change some crucial code in params.go file, but I think that is a simple fix.

NoGambiNoBugs commented 1 year ago

@hexdigest I tested this example, but for me it works well, here is the examples using the version of PR https://github.com/hexdigest/gowrap/pull/68.

hexdigest commented 1 year ago

@zshehov

Please try latest v1.3.2 release with generics functionality.