helpers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s []string, e string) bool

func Exec

func Exec(cmd string, args []string, env []string) error

This allows a multi-platform switch in the future

func Factorial

func Factorial(n uint64) (result uint64)

func GetHomeDir

func GetHomeDir() (ans string)

func GetURI

func GetURI(s string) (string, error)

func IsUrl

func IsUrl(s string) bool

func ReverseAny

func ReverseAny(s interface{})

func SanitizeImageString

func SanitizeImageString(s string) string

func Tar

func Tar(src, dest string) error

func Untar

func Untar(src, dest string, sameOwner bool) error

Untar just a wrapper around the docker functions

func UntarProtect

func UntarProtect(src, dst string, sameOwner bool, protectedFiles []string, modifier *TarModifierWrapper) error

Types

type TarModifierWrapper

type TarModifierWrapper struct {
	DestinationPath string
	Modifier        TarModifierWrapperFunc
}

func NewTarModifierWrapper

func NewTarModifierWrapper(dst string, modifier TarModifierWrapperFunc) *TarModifierWrapper

func (*TarModifierWrapper) GetModifier

func (m *TarModifierWrapper) GetModifier() archive.TarModifierFunc

type TarModifierWrapperFunc

type TarModifierWrapperFunc func(path, dst string, header *tar.Header, content io.Reader) (*tar.Header, []byte, error)

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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