utils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TempRoot string

Functions

func ExampleMutex

func ExampleMutex()

func LogDefer

func LogDefer(f func() error)

func LogError

func LogError(err error)

func LogFatal

func LogFatal(err error)

func RemoveTempRoot

func RemoveTempRoot() error

func TempClean

func TempClean(path string)

func TempDir

func TempDir() (string, error)

func TempFile

func TempFile() (*os.File, error)

Types

type Git

type Git interface {
	Fetch(dir string, repo string, branch string) (string, error)
}

func NewGit

func NewGit(repos map[string]*api.GitRepository) Git

type GitMock

type GitMock struct {
	mock.Mock
}

func NewGitMock

func NewGitMock() *GitMock

func (*GitMock) Fetch

func (m *GitMock) Fetch(dir string, repo string, branch string) (string, error)

type Mutex

type Mutex struct {
	// contains filtered or unexported fields
}

A Mutex is a mutual exclusion lock which uses a channel as lock.

This Mutex can be used in select statement, whereas sync.Mutex cannot.

func NewMutex

func NewMutex() *Mutex

func (*Mutex) Lock

func (m *Mutex) Lock() chan interface{}

func (*Mutex) UnLock

func (m *Mutex) UnLock()

Jump to

Keyboard shortcuts

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