utils

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckInstalled

func CheckInstalled(cmd string, arg string) error

func ConfigPath

func ConfigPath() (string, error)

func CreateDir

func CreateDir(p string) error

func CreateFile

func CreateFile(p string, d []byte, o bool) error
func CreateSymlink(symlinks ...*Symlink) error

func FileExists

func FileExists(p string) error

TODO: This should be used in all above functions for test if exists

func ProgressTicker

func ProgressTicker(headline string, wg *sync.WaitGroup, ch <-chan bool)

func ReadFile

func ReadFile(filePath string) ([]byte, error)

func RemoveDir

func RemoveDir(p string) error

Types

type Repo

type Repo struct {
	Url  string
	Dst  string
	Ref  string
	Link Symlink
}

func NewRepo

func NewRepo() *Repo

func (*Repo) Clone

func (r *Repo) Clone(force bool) error

func (*Repo) SetDestination

func (r *Repo) SetDestination(dst string)
func (r *Repo) SetLink(source string, target string)

func (*Repo) SetRef

func (r *Repo) SetRef(ref string)

func (*Repo) SetURL

func (r *Repo) SetURL(url string)
type Symlink struct {
	Source string
	Target string
}
func NewSymlink(src string, tgt string) *Symlink
func (s *Symlink) Link() error

func (*Symlink) SetSource

func (s *Symlink) SetSource(source string)

func (*Symlink) SetTarget

func (s *Symlink) SetTarget(target string)

Jump to

Keyboard shortcuts

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