Documentation ¶
Index ¶
- Variables
- func AppendToFile(t *testing.T, filepath, str string)
- func CleanupTempFiles()
- func CreateLargeTempFile(t *testing.T) (path string)
- func CreateTempDir(t *testing.T) (path string)
- func CreateTempFile(t *testing.T) (path string)
- func RandBytes(n int) (b []byte)
- func RandSHA1() (out [sha1.Size]byte)
- func RandSeed(seed int)
- func RandString(n int) string
- func RandWords(n int) []byte
- func TouchFileTime(t *testing.T, filepath string, ts time.Time)
Constants ¶
This section is empty.
Variables ¶
View Source
var TempDir = func() string { abs, err := fs.AbsPath(os.TempDir()) if err != nil { panic(err) } return abs }()
The absolute path (after following symlinks) of os.TempDir()
Functions ¶
func AppendToFile ¶
func CleanupTempFiles ¶
func CleanupTempFiles()
func CreateLargeTempFile ¶
Write a 500KB file to the TempDir and return the path.
func CreateTempDir ¶
func CreateTempFile ¶
Write a 50 byte file to the TempDir and return the path.
func RandString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.