You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I'd like to thank you @tarampampam for building this! I'm using error-pages for my homelab Traefik instance and I like it very much :)
For a long time I've been customizing all the status messages/descriptions via the config file, and some include commas and slashes.
When the v3 update came out, I began trying to convert these definitions to the --add-code flag equivalents, but I noticed that using commas and slashes caused errors when parsing the flags because:
By default urfave/cli treats commas as a separator for the different elements of the string map.
Slashes are used for separating the message from the description.
I wanted to share that I worked around this by replacing these special characters in the flag with ##comma## and ##slash##. Then, in my custom template I replace these special strings back to actual commas and slashes using the strReplace function which you made available:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
First of all, I'd like to thank you @tarampampam for building this! I'm using error-pages for my homelab Traefik instance and I like it very much :)
For a long time I've been customizing all the status messages/descriptions via the config file, and some include commas and slashes.
When the v3 update came out, I began trying to convert these definitions to the
--add-code
flag equivalents, but I noticed that using commas and slashes caused errors when parsing the flags because:I wanted to share that I worked around this by replacing these special characters in the flag with
##comma##
and##slash##
. Then, in my custom template I replace these special strings back to actual commas and slashes using thestrReplace
function which you made available:It's not ideal, but I can continue using commas and slashes, so I'm happy with that ;)
Beta Was this translation helpful? Give feedback.
All reactions