We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
package max // template type Max(A) type A int func Max(x, y A) A { if x < y { return y } return x }
for above template, is ok to generate multiple files.
//go:generate gotemplate "xxx/max" "MaxInt(int)" //go:generate gotemplate "xxx/max" "MaxInt8(int8)" //go:generate gotemplate "xxx/max" "MaxInt16(int16)" //go:generate gotemplate "xxx/max" "MaxInt32(int32)" //go:generate gotemplate "xxx/max" "MaxInt64(int64)"
since the template is too simple, it's better to organize these functions into a single file.
is it possible to accept multiple arguments something like this?
// go:generate gotemplate -out "MaxInts" "xxx/max" "MaxInt(int)" "MaxInt8(int8)" "MaxInt16(int16)" "MaxInt32(int32)" "MaxInt64(int64)"
The text was updated successfully, but these errors were encountered:
This isn't possible at the moment, but it doesn't sound too difficult... Fancy sending a PR?
Sorry, something went wrong.
No branches or pull requests
for above template, is ok to generate multiple files.
since the template is too simple, it's better to organize these functions into a single file.
is it possible to accept multiple arguments something like this?
The text was updated successfully, but these errors were encountered: