pulumi/pkg/encoding/init.go
Pat Gavlin a23b10a9bf
Update the copyright end date to 2018. (#1068)
Just what it says on the tin.
2018-03-21 12:43:21 -07:00

25 lines
518 B
Go

// Copyright 2016-2018, 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 metadata 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 extension '%s'", ext)
}
}
}