problem description
how to develop filter plug-ins for ansible with golang? The
module can be developed in go, and the filter plug-in doesn"t know if it works.
the platform version of the problem and what methods you have tried
python always has problems with single and double quotes, so it is intended to use golang.
related codes
/ / Please paste the code text below (do not replace the code with pictures)
python version
def single_double(a_list):
new_list = [ "%s" % an_element for an_element in a_list]
-sharpreturn ""%s"" % new_list
return new_list
class FilterModule(object):
def filters(self):
return {"single_double": single_double}
what result do you expect? What is the error message actually seen?
filter plug-ins for developing ansible using golang can provide some sample code