Support nested-dicts in generate-clojure-map

This commit is contained in:
bom 2022-12-29 10:11:44 +01:00
parent 1a07e52456
commit 7a37afa82f

View file

@ -25,6 +25,9 @@ class C4kMixin(DevopsBuild):
def __generate_clojure_map(self, template_dict):
clojure_map_str = '{'
for key, value in template_dict.items():
if type(value) is dict:
clojure_map_str += f':{key} {self.__generate_clojure_map(value)}\n'
else:
clojure_map_str += f':{key} "{value}"\n'
clojure_map_str += '}'
return clojure_map_str