Documentation ¶
Overview ¶
Package testutil contains helpers to simplify tests
Index ¶
- func NewStringValue(v string) pflag.Value
- func TempDir(t *testing.T) (out string, cleanup func())
- func TempFile(t *testing.T) (out *os.File, cleanup func())
- func TestdataPath(t *testing.T) string
- func UnTar(t *testing.T, repoName RepoName) (repoPath string, cleanup func())
- type RepoName
- type StringValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStringValue ¶
NewStringValue creates a new StringValue Flag
func TestdataPath ¶
TestdataPath returns the absolute path to the testdata directory
Types ¶
type RepoName ¶
type RepoName string
RepoName represent the name of a test repository
const ( // RepoSmall is a snapshot of this repo up to commit bbb720a // from Fri Jun 19 18:16:17 2020 -0700 RepoSmall RepoName = "small_repo" )
type StringValue ¶
type StringValue struct {
Value string
}
StringValue represents a Flag value to be parsed by spf13/pflag
func (*StringValue) Set ¶
func (v *StringValue) Set(value string) (err error)
Set sets the flag's value. When called multiple times: - If the value is a relative path it will be append to the previous value - If the value is an absolute path: it will overwrite the previous value
func (*StringValue) Type ¶
func (v *StringValue) Type() string
Type returns the unique type of the Value
Directories ¶
Path | Synopsis |
---|---|
Package confutil contains helpers and function to generate basic configuration
|
Package confutil contains helpers and function to generate basic configuration |
Package exe contains helpers to help running commands
|
Package exe contains helpers to help running commands |
Click to show internal directories.
Click to hide internal directories.