Skip to content

🚣 Package for running quick commands and simple interaction with directories

License

Notifications You must be signed in to change notification settings

xyproto/workingdir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

workingdir

Package for running quick commands and simple interaction with directories.

Quick example

package main

import (
	wd "github.com/xyproto/workingdir"
)

func main() {
	print(wd.Run("echo hello"))
}

Another example

package main

import (
	"fmt"
	wd "github.com/xyproto/workingdir"
)

func main() {
	dir, err := wd.New("/tmp")
	if err != nil {
		panic(err)
	}
	fmt.Printf("There are %d entries in %s\n", len(dir.List()), dir.Path())
	fmt.Printf("Current date: %s\n", dir.TrimRun("date --iso-8601"))
}

General info

About

🚣 Package for running quick commands and simple interaction with directories

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages