validation

command
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 6 Imported by: 0

README

Validation Tool

Script for validating MMDB file data against built-in reference values.

Usage

From validation directory:
cd cmd/validation
go run main.go [path_to_mmdb_file]
From project root directory:
go build -o validate cmd/validation/main.go
./validate [path_to_mmdb_file]
Examples:
# Show help

./validate -h
./validate --help
./validate help

# Validate asn.mmdb (default)
./validate

# Validate specific file
./validate asn.mmdb
./validate /path/to/custom.mmdb

Test Data

The script contains a built-in set of 43 test IP addresses with expected results in format:

IP;Network;ASN
8.218.98.78;8.218.0.0/17;45102
36.92.222.105;36.92.0.0/16;7713

Output

The script outputs:

  • ✅ for correct matches
  • ❌ for mismatches with detailed description
  • Final test statistics

Exit codes:

  • 0 - all tests passed
  • 1 - errors or mismatches found

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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