util

package
v0.0.44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var VersionString = "0.0.0-local"

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

Functions

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 added in v0.0.7

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 added in v0.0.6

func PtrBool(v bool) *bool

func PtrFloat32 added in v0.0.6

func PtrFloat32(v float32) *float32

func PtrInt added in v0.0.6

func PtrInt(v int) *int

func PtrInt32 added in v0.0.6

func PtrInt32(v int32) *int32

func PtrInt64 added in v0.0.6

func PtrInt64(v int64) *int64

func ToYaml

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL