1302fc8a47
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.
25 lines
489 B
Go
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)
|
|
}
|
|
}
|
|
}
|