Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckEqual ¶ added in v1.11.0
func Merge ¶
Merge merges a couple of yaml files into one yaml file, a field in latter file will override the same field in former file.
func MergeAndUnmarshal ¶
MergeAndUnmarshal merges a couple of yaml files into one yaml file, and return a map[string]interface{}, a field in latter file will override the same field in former file.
func SearchByPattern ¶
func SearchByPattern(flatMap map[string]interface{}, patterns []map[string]string) ([]map[string]string, error)
SearchByPattern find all matched absolute paths from yaml by the pattern appointed input pattern: []map{name => relative-path} output: app paths found which match the relative-path rule, []{map[name]=>absolute-path} eg: sourceYaml: ---------- yaml begin env: dev svc1:
image: repository: go-sample-site tag: "0.2.1"
svc2:
image: repository: go-sample-site-2 tag: "0.2.2"
imagePullSecrets:
- name: default-secret
----------- yaml end pattern: []{"image": "repository", "tag": "tag"} output: []{{"image": "svc1.image.repository", "tag": "svc1.image.tag"}, {"image": "svc2.image.repository", "tag": "svc2.image.tag"}}
Types ¶
This section is empty.