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

support generics #108

Open
KaungMyatChanThar opened this issue Jan 29, 2024 · 1 comment
Open

support generics #108

KaungMyatChanThar opened this issue Jan 29, 2024 · 1 comment

Comments

@KaungMyatChanThar
Copy link

latest version gives error expected '(', found '[' for generics.

The syntax -
func bootThirdPartyClient[T any](address string, isNewRelicEnabled bool, fn func(cc grpc.ClientConnInterface) T) (T, error) { client := grpcclient.New(isNewRelicEnabled) if err := client.Connect(address, log); err != nil { var tmp T return tmp, fmt.Errorf("grpcclient.New(): %w", err) } return fn(client.ClientConn), nil }

@dnephin
Copy link
Owner

dnephin commented Mar 1, 2024

Hello, thank you for the bug report! Unfortunately I am not maintaining this repo anymore. See #98.

Maybe one of the other golang pre-commit hooks have this support.

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

2 participants