urllinter

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 6 Imported by: 0

README

urllinter

urllinter is used to verify and validate URLs or links.This linter gathers all URLs(based on configuration), check them by calling http requests.

The problem

Each and every URL or link in this repo must be in working state.It is practically difficult to check each of the URLs manually and ensure they are working.

Solution

urllinter pasrses all files (path provided in configuration) and stores them.Iteratively it checks whether the URL is working or not.All failure cases are marked as Fail and success cases are marked as Pass.

Configuration

urllinter supports few configurations.The below is the default configuration file.

---
includeExts:
- ".yaml"
- ".sh"
- ".yml"
- ".md"
excludeLinks:
- "http://localhost"
- "https://localhost"
- "http://127.0.0.1"
- "https://127.0.0.1"
- "http://0.0.0.0"
- "https://0.0.0.0"
- "https://vault.example.com:8200"
- "$"
- "<"
- ">"
- "@"
excludeFiles:
- "cli/"
- .git/
- docs/
- ".gitignore"
- ".github/"
acceptStatusCodes:
- 200
- 201
- 302
- 401
- 403

How to install urllinter

To download source code and install urllinter git clone https://github.com/JitenPalaparthi/urllinter.git

cd to the urllinter directory and run go install github.com/JitenPalaparthi/urllinter

The above command generates the single binary file.Default configuration is embed into it.

How to run urllinter

  • go run main.go --path <any valid path or it takes only current working directory> -- config <provide config path or default path will be taken> --summary=true --details=fail

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL