genutil

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsExist

func IsExist(path string) bool

IsExist returns true if path exists on disk.

func IsNotExist

func IsNotExist(path string) bool

IsNotExist returns true if path does not exist on disk.

func MakeCSVName

func MakeCSVName(name, version string) string

MakeCSVName returns a ClusterServiceVersion's name.

func WriteObject

func WriteObject(w io.Writer, obj interface{}) error

WriteObject writes a k8s object to w.

func WriteYAML

func WriteYAML(w io.Writer, obj interface{}) error

WriteObject writes any object to w.

Types

type File

type File struct {
	*os.File
}

File wraps os.File. Use this type when generating files that may already exist on disk and should be overwritten.

func Open

func Open(dir, fileName string) (*File, error)

Open first creates dir then opens <dir>/<fileName> for reading and writing, creating the file if it does not exist.

type InternalError

type InternalError string

InternalError wraps errors that are development issues and unrelated to user input.

func (InternalError) Error

func (e InternalError) Error() string

Jump to

Keyboard shortcuts

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