Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package main
import (
func main() {
in, err := ioutil.ReadAll(os.Stdin)
if err != nil {
log.Fatalln("Read error:", err)
varPlaceholder := regexp.MustCompile(`\{\{.+\}\}`)
in = varPlaceholder.ReplaceAll(in, []byte("VARIABLE"))
var config atc.Config
err = yaml.Unmarshal(in, &config)
if err != nil {
log.Fatalln("Unmarshall error:", err)
out, err := yaml.Marshal(&config)
if err != nil {
log.Fatalln("Marshall error:", err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.