util

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile added in v0.0.7

func CopyFile(source string, destination string) (int64, error)

func DecodeYAML

func DecodeYAML(r io.ReadCloser, as interface{}) error

DecodeYAML tries to decode file as YAML format

func EncodeToYAML

func EncodeToYAML(obj interface{}) ([]byte, error)

func IsDirectory added in v0.0.7

func IsDirectory(path string) (bool, error)

func ReadYAMLFromFile

func ReadYAMLFromFile(path string, as interface{}) error

ReadYAMLFromFile loads a file from the FS into the provided object.

func RemoveSymLink(path string) error

RemoveSymLink removes a symlink reference if exists.

Types

type OSArchPair

type OSArchPair struct {
	OS, Arch string
}

OSArchPair is wrapper around operating system and architecture

func OSArch

func OSArch() OSArchPair

OSArch returns the OS/arch combination to be used on the current system

func (OSArchPair) String

func (p OSArchPair) String() string

String converts environment into a string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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