Common code used in Go projects
Usage:
go get github.com/unidev-platform/golang-core
Important directories:
xfiles
- file related utilitiesxcollection
- collections related functionsxstring
- strings operations
List files from directory matching extension:
list, err := xfiles.Find("/tmp/domains", ".txt")
if err != nil {
log.Fatal(err)
}
for _, file := range list {
log.Printf("%v\n", file)
}
This code is released under the MIT License. See LICENSE.