Use this tool to check for any potentially dead links on a given web page.
To be written.
- Clone the project
- If you have Go >=1.13 installed run
go mod download && go build -o main
, otherwise rundocker build -t nikoheikkila/go-link-health .
The command takes a URL as first argument. If no URL is specified a help text will be printed.
The command searches for HTML anchors found on the given page, visits them in parallel, and prints their status. A link is considered healthy if and only if a request to it returns HTTP status code between 200–299 within reasonable time. Occurred errors are logged.
This is my first real Go project intended mainly as a scripting tool for myself. Any contributions towards more robust and idiomatic Golang code is welcomed. Send the PRs my way.