Development Setup
Requires Go 1.26+ installed.
Build from source
- macOS
- Linux
- Windows
CGO_ENABLED=0 \
GOOS=darwin \
GOARCH=arm64 \
go build \
-ldflags='-w -s -extldflags "-static"' \
-tags netgo \
-o validator \
cmd/validator/validator.go
For Intel Macs, use GOARCH=amd64.
Install:
cp ./validator /usr/local/bin/
chmod +x /usr/local/bin/validator
CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64 \
go build \
-ldflags='-w -s -extldflags "-static"' \
-tags netgo \
-o validator \
cmd/validator/validator.go
Install:
cp ./validator /usr/local/bin/
chmod +x /usr/local/bin/validator
$env:CGO_ENABLED = '0'
$env:GOOS = 'windows'
$env:GOARCH = 'amd64'
go build `
-ldflags='-w -s -extldflags "-static"' `
-tags netgo `
-o validator.exe `
cmd/validator/validator.go
Install to Local App Data:
$install = Join-Path $env:LOCALAPPDATA 'Programs\validator'
New-Item -Path $install -ItemType Directory -Force | Out-Null
Copy-Item -Path .\validator.exe -Destination $install -Force
Run tests
go test ./...
Docker build
docker build . -t config-file-validator:latest
Run against a local directory:
docker run --rm -v "$(pwd):/work" config-file-validator:latest /work