Documentation
¶
Index ¶
- func CheckFatal(t *testing.T, err error)
- func DurationStr(secs int) string
- func FormatDuration(secs int) string
- func LeftPad2Len(s string, padStr string, overallLen int) string
- func Map(vs []string, f func(string) string) []string
- func Percent(val, total int) float64
- func RightPad2Len(s string, padStr string, overallLen int) string
- func StringInSlice(list []string, a string) bool
- type ByInt64
- type TestRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFatal ¶
CheckFatal raises a fatal error if error is not nil
func DurationStr ¶
DurationStr returns seconds as a duration string, i.e. 9h10m30s
func FormatDuration ¶
FormatDuration converts seconds into a duration string
func LeftPad2Len ¶
LeftPad2Len https://github.com/DaddyOh/golang-samples/blob/master/pad.go
func Map ¶
Map applys a func to a string array
func RightPad2Len ¶
RightPad2Len https://github.com/DaddyOh/golang-samples/blob/master/pad.go
func StringInSlice ¶
StringInSlice https://github.com/DaddyOh/golang-samples/blob/master/pad.go
Types ¶
type TestRepo ¶
type TestRepo struct {
// contains filtered or unexported fields
}
TestRepo represents a test git repo used in testing
func NewTestRepo ¶
NewTestRepo creates a new instance of TestRepo
func (TestRepo) Commit ¶
func (t TestRepo) Commit(treeID *git.Oid) *git.Oid
Commit commits staged files
func (TestRepo) PathIn ¶
PathIn returns full path of file within repo
func (TestRepo) Remove ¶
func (t TestRepo) Remove()
Remove deletes temp directories, files and git repo
func (TestRepo) SaveFile ¶
SaveFile creates a file within the git repo project
Source Files
¶
- sort.go
- string.go
- test.go