View Source
const YamlContentHeader string = "# DO NOT MODIFY! This file was generated by the Riser platform. Changes will be lost\n"


View Source
var VersionString = "0.0.0-local"

VersionString is a that's overwritten by the compiler using ldflags


func AssertSnapshot

func AssertSnapshot(t *testing.T, snapshotDir string, actualFiles []core.ResourceFile)

AssertSnapshot asserts that a snapshot (aka "gold files") are equal to the generated resource files

func EnsureDir

func EnsureDir(dirOrFilePath string, fileMode os.FileMode) error

EnsureDir ensures that a directory exists for a given file or directory path. Note that a directory path must have a trailing slash

func EnsureTrailingSlash

func EnsureTrailingSlash(path string) string

func ParseYaml

func ParseYaml(in []byte, out interface{}) error

ParseYaml deserializes YAML into a struct with JSON tags. This uses k8s encoding packages for consistenct

func PtrBool

func PtrBool(v bool) *bool

func PtrFloat32

func PtrFloat32(v float32) *float32

func PtrInt

func PtrInt(v int) *int

func PtrInt32

func PtrInt32(v int32) *int32

func PtrInt64

func PtrInt64(v int64) *int64

func ShouldUpdateSnapshot

func ShouldUpdateSnapshot() bool

ShouldUpdateSnapshot checks for the UPDATESNAPSHOT env var to determine if snapshot content should be updated

func ToYaml

func ToYaml(in interface{}) ([]byte, error)

ToYaml serializes to pretty YAML with JSON tags using the k8s encoding packages for consistency


This section is empty.