I'm using confd to populate a file through a template.
In this file, I want to have a list of elements shifted and inserted. This slice contains strings like
0=container-1
1=container-2
2=container-3
3=container-4
(in fact, it is a string that I split using split
confd function).
I want, on each container, be able to filter container name out and shift the list to have the ones after my container appear first.
As an example, on container-2
I would like to have as result
2=container-3
3=container-4
0=container-1
How to do that in a confd go template ? I think I know how to do that in go (but I'm not that good in that particular language), but I don't find how to do that using only a template ...