Skip to content

noscripter/vanish

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vanish

Vanish is a minimal Go library to use temporary files and directories.

GoDoc Build Status

Install

go get github.com/bfontaine/vanish/vanish

Usage

Vanish works with callbacks:

import "github.com/bfontaine/vanish/vanish"

vanish.File(func(name string) {
    // 'name' is a temporary file, use it here as you want, it’ll be deleted
    // at the end of the function
})

vanish.Dir(func(name string) {
    // here, 'name' is a directory
})

vanish.Env(func() {
    // we can modify the environment here, it’ll be restored at the end of the
    // function
})

About

✨ Temporary files and directories made easy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%