utils

package
v0.0.0-...-fa8d383 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OsFs = afero.Afero{Fs: afero.NewOsFs()}

OsFs is an instance of afero.NewOsFs

Functions

func Exec

func Exec(cmd *exec.Cmd) string

Exec exec command on the host and return the output

func FileExists

func FileExists(filename string) (bool, error)

FileExists afero for some reason does not have such a function, so...

func Ptr

func Ptr[T any](v T) *T

func RandomHex

func RandomHex(n int) string

Types

type StopChan

type StopChan struct {
	Chan chan struct{}
	sync.Once
}

func NewStopChan

func NewStopChan() *StopChan

func (*StopChan) CloseOnce

func (s *StopChan) CloseOnce()

Jump to

Keyboard shortcuts

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