It seems like generateURL() could be use to completely assemble the URL from its slug parts just by passing the parts as varargs. But none of the calling code actually uses this feature, and instead assembles most of the URL with a couple different approaches.
E.g. in RegisterInstance(), two approaches in combination are used, Sprintf and later string cat:
Second question: what purpose does the EurekaURLSlugs[] lookup serve if it only ever maps a string to a nearly identical string. Maybe we can just remove it? Then the above would be:
It seems like generateURL() could be use to completely assemble the URL from its slug parts just by passing the parts as varargs. But none of the calling code actually uses this feature, and instead assembles most of the URL with a couple different approaches.
E.g. in RegisterInstance(), two approaches in combination are used, Sprintf and later string cat:
And it seems that using generateURL() to do the work would be simpler:
Second question: what purpose does the EurekaURLSlugs[] lookup serve if it only ever maps a string to a nearly identical string. Maybe we can just remove it? Then the above would be:
I can test this and prepare a PR if it makes sense to you.