如果不匹配,领事模板过滤器

Pet*_*fel 0 templates filter consul

有没有办法使用 consul 模板来过滤不匹配的内容?

就像是

{{services NOT "@east-aws"}}
...
Run Code Online (Sandbox Code Playgroud)

我没有在存储库自述文件中找到它

Pet*_*fel 5

好的,想通了。

{{ range services }}
  {{ if ne .Name "name-of-service" }}
    ......
  {{ end }}
{{ end }}
Run Code Online (Sandbox Code Playgroud)