A library with functions I use all the time in my projects.
Also useful if you are starting to learn Go and are annoyed by implementing basic things in your project all the time.
Warning: the v1 version is deprecated, please use friendly/v2 instead.
In your project directory, type
go get github.com/alexcoder04/friendly/v2
# or `go get github.com/alexcoder04/friendly/v2/...` depending on the sub-package you needAnd then, in your code
package...import (
..."github.com/alexcoder04/friendly/v2""github.com/alexcoder04/friendly/v2/ffiles"
)
...folder, _:=friendly.Input()
ifffiles.IsDir(folder) {
friendly.CompressFolder(folder, destination)
}
...The documentation can be found on pkg.go.dev:
If you use this library and are missing some feature - don't hesitate to open a pull request or an issue, I'm always looking forward to improve this project!