Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated imports fail when we have an alias #90

Open
NoGambiNoBugs opened this issue Jun 19, 2024 · 0 comments
Open

Generated imports fail when we have an alias #90

NoGambiNoBugs opened this issue Jun 19, 2024 · 0 comments

Comments

@NoGambiNoBugs
Copy link

When we have some interface with methods that use parameters from another package that was imported with an alias... the result is not going well, just to explain:

This is working:

Code:

import ".../pkg/proto"

...

// MyInterface is a driven port.
//
//go:generate gowrap gen -g -i MyInterface -t ../templates/log.go.tmpl -o ./decorators/logs/url_shortener_gateway_with_logs.go
type MyInterface interface {
	MyMethod(ctx context.Context, body proto.Incomming) (proto.Outcomming, error)
}

This isn't working:

Code:

import alias ".../pkg/proto"

...

// MyInterface is a driven port.
//
//go:generate gowrap gen -g -i MyInterface -t ../templates/log.go.tmpl -o ./decorators/logs/url_shortener_gateway_with_logs.go
type MyInterface interface {
	MyMethod(ctx context.Context, body alias.Incomming) (alias.Outcomming, error)
}

I am using the latest version of package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant