go-yaml-tools

module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: Apache-2.0

README

Coverage Status

Go implementation of this library:

https://github.com/armory-io/yaml-tools/blob/master/yamltools/resolver.py

How To Use This Package

The main package is the spring package.

The only exposed function is:

func LoadProperties(propNames []string, configDir string, envKeyPairs []string) (map[string]interface{}, error)

For example if you want to load the following files:

  • spinnaker.yml
  • spinnaker-local.yml
  • gate-local.yml
  • gate-armory.yml

For propNames you would give

["spinnaker", "gate"]

and you'll need to make sure your envKeyPairs has the following key pair as one of it's variables

SPRING_PROFILES_ACTIVE="armory,local"

The configDir is where the configuration files live, typically /opt/spinnaker/config for Spinnaker files.

Directories

Path Synopsis
pkg
tls

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL