mirror of https://github.com/pulumi/pulumi.git
47 lines
1.1 KiB
Go
47 lines
1.1 KiB
Go
// Code generated by test DO NOT EDIT.
|
|
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
package config
|
|
|
|
import (
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
|
|
"regress-go-12971/example/internal"
|
|
)
|
|
|
|
var _ = internal.GetEnvOrDefault
|
|
|
|
func GetName(ctx *pulumi.Context) string {
|
|
v, err := config.Try(ctx, "world:name")
|
|
if err == nil {
|
|
return v
|
|
}
|
|
var value string
|
|
if d := internal.GetEnvOrDefault(nil, nil, "WORLD_NAME"); d != nil {
|
|
value = d.(string)
|
|
}
|
|
return value
|
|
}
|
|
func GetPopulated(ctx *pulumi.Context) bool {
|
|
v, err := config.TryBool(ctx, "world:populated")
|
|
if err == nil {
|
|
return v
|
|
}
|
|
var value bool
|
|
if d := internal.GetEnvOrDefault(nil, internal.ParseEnvBool, "WORLD_POPULATED"); d != nil {
|
|
value = d.(bool)
|
|
}
|
|
return value
|
|
}
|
|
func GetRadiusKm(ctx *pulumi.Context) float64 {
|
|
v, err := config.TryFloat64(ctx, "world:radiusKm")
|
|
if err == nil {
|
|
return v
|
|
}
|
|
var value float64
|
|
if d := internal.GetEnvOrDefault(nil, internal.ParseEnvFloat, "WORLD_RADIUS_KM"); d != nil {
|
|
value = d.(float64)
|
|
}
|
|
return value
|
|
}
|