Various Helpers in GoLang
import (
"fmt"
"github.com/matusstafura/ant/extract"
)
func main() {
sitemap := extract.UrlsFromFile("content/test/sitemap.xml")
fmt.Println(sitemap) // [http://www.example.com http://www.other.com]
sitemap := extract.UrlsFromUrl("https://www.example.com")
fmt.Println(sitemap) // [http://www.example.com http://www.other.com]
}
go run main.go -f=extract -input="path/to/inputfile" -output="dump.txt"
run all tests
go test ./... -v
coverage
./scripts.sh coverage