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
raymond.RegisterHelper("addParamsToLink", func(link string, params ...string) string { // details not important return "banana" }) template, _ := raymond.Parse(`{{addParamsToLink baseLink parameter second}}`) // and a test t.Run("adds two parameters to url with parameter", func(t *testing.T) { context := map[string]string{ "baseLink": "localhost:8080/?time=now", "parameter": "drink=beer", "second": "place=bar", } result, _ := template.Exec(context) assert.Equal(t, "localhost:8080/?time=now&drink=beer&place=bar", result, "adds two parameters simple url") })
The test fails because the helper seems to return an empty string. I suspect it is panic-ing silently.
If I remove the vararg-ness it returns banana
banana
The text was updated successfully, but these errors were encountered:
Did you find any solution to above?
Sorry, something went wrong.
any update or has anyone found a solution to this?
I fixed this on a fork of the mailgun/raymond repo: mailgun/raymond@master...pbedat:raymond:master
No branches or pull requests
The test fails because the helper seems to return an empty string. I suspect it is panic-ing silently.
If I remove the vararg-ness it returns
banana
The text was updated successfully, but these errors were encountered: