pulumi/pkg/encoding/init.go
Joe Duffy f6e694c72b Rename pulumi-fabric to pulumi
This includes a few changes:

* The repo name -- and hence the Go modules -- changes from pulumi-fabric to pulumi.

* The Node.js SDK package changes from @pulumi/pulumi-fabric to just pulumi.

* The CLI is renamed from lumi to pulumi.
2017-09-21 19:18:21 -07:00

25 lines
517 B
Go

// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
package encoding
import (
"github.com/pulumi/pulumi/pkg/util/contract"
)
func init() {
// Ensure a marshaler is available for every possible Lumifile 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:
contract.Failf("No Marshaler available for LumifileExt %v", ext)
}
}
}