A linkchecker is a simple CLI tool to find all broken links in your website.
-
with Taskfile
task build
-
with Go CLI
go build -o linkchecker cmd/linkchecker/main.go
-
with Taskfile
task test # run all tests with integrational included task test-all
-
with Go CLI
go test ./...
./linkchecker -url https://en.wikipedia.org/
parsed url: https://en.wikipedia.org/
97 links scanned, 0 broken links found
./linkchecker -url https://en.wikipedia-broken.org/
Get "https://en.wikipedia-broken.org/": dial tcp: lookup en.wikipedia-broken.org: no such host
./linkchecker -url https://github.com/Jasstkn/link-checker
13 links scanned, 1 broken link found:
https://github.com/Jasstkn/test-repo.git
./linkchecker -server
INFO[0000] starting server
Open localhost:3000 and you will see a simple UI:
docker run linkchecker:0.1.1 -url=https://github.com/Jasstkn/link-checker
16 links scanned, 1 broken link found:
https://github.com/Jasstkn/test-repo.git
broken link to test