I saw issue #178 and the comment by @m-rots , and thought I'd try my hand at Go (still a novice at it).
Instead of putting the slashDirection option in the Rewrite configurations, I thought (possibly naively) that it'd make more sense in the individual trigger/targets themselves. My thinking was that each instance of the services won't change it's slash preference, but separate instances could.
The idea being Autoscan wants everything internally to itself to be forward slashes, so:
Targets must convert from forward slashes to their preference
Triggers must convert from their preference to forward slashes
The possibly confusing part is that the replacements occur before and after the rewrite rules process.
So from the example issue:
rewrite:
- from: /partage/
to: \\dn\partage\
- from: /partaget/
to: \\dn\partaget\
would instead be:
rewrite:
from: /partage/
to: //dn/partage/
from: /partaget/
to: //dn/partaget/
Since all slashes when rewriting are forward. Should also avoid any RegEx expression escaping issues with the backward slashes.
I saw the comment about enumeration, don't really know how to make one in Go, and then have the Yaml serializer convert it, so I left everything as strings.
I saw issue #178 and the comment by @m-rots , and thought I'd try my hand at Go (still a novice at it).
Instead of putting the slashDirection option in the Rewrite configurations, I thought (possibly naively) that it'd make more sense in the individual trigger/targets themselves. My thinking was that each instance of the services won't change it's slash preference, but separate instances could.
The idea being Autoscan wants everything internally to itself to be forward slashes, so:
The possibly confusing part is that the replacements occur before and after the rewrite rules process. So from the example issue:
I saw the comment about enumeration, don't really know how to make one in Go, and then have the Yaml serializer convert it, so I left everything as strings.