Skip to content

galijot/cloner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloner

A package for folder cloning.

Installation

Install the package to your $GOPATH with the go get tool from shell:
$ go get -u github.com/galijot/cloner

Usage

  • Import the package like
    import "github.com/galijot/cloner"
  • Create a struct & implement CloneOptions interface.
type options struct {
	includeHiddenItems bool
}

func (o options) IncludeHidden() bool {
	return o.includeHiddenItems
}
  • Send the source and destination paths along options to cloner's Clone function
    cloner.Clone("path/to/src/dir/", "path/to/dst/dir/", options{false})
  • That's it 🎉

Also, the example project is available here.

Sub-packages

cloner includes few additional standalone sub-packages;

  • cper - used for directory & file copying
  • flogger - used for logs, which are written to a file at provided path

About

go-lang package used for folder cloning.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages