pulumi/pkg/encoding/init.go
joeduffy 1302fc8a47 Add rudimentary template expansion
This change performs template expansion both for root stack documents in
addition to the transitive closure of dependencies.  There are many ongoing
design and implementation questions about how this should actually work;
please see marapongo/mu#7 for a discussion of them.
2016-11-25 12:58:29 -08:00

25 lines
489 B
Go

// Copyright 2016 Marapongo, Inc. All rights reserved.
package encoding
import (
"github.com/marapongo/mu/pkg/util"
)
func init() {
// Ensure a marshaler is available for every possible Mufile extension
Marshalers = make(map[string]Marshaler)
for _, ext := range Exts {
switch ext {
case ".json":
Marshalers[ext] = JSON
case ".yml":
fallthrough
case ".yaml":
Marshalers[ext] = YAML
default:
util.FailMF("No Marshaler available for MufileExt %v", ext)
}
}
}