Go CLI for Hyperledger Fabric testnet. Uses Cobra, Viper, Zap logging, and a custom fork of fabric-sdk-go (go.mod replace directive).
make build # go build -mod=vendor (current platform)
make build-all # cross-compile to linux/darwin/windows, 386/amd64vendor/ is gitignored. Populate first: go mod vendor. Ldflags inject version/commit/date.
- check-cyrillic-comments — grep fails on any Cyrillic chars in source files
- validate-go —
go mod tidy+git diff --exit-codeongo.mod; thengo fmt ./...+go fix ./...+git diff --exit-code - golangci-lint — v2.9.0, config
.golangci.yml(v2 format), lints non-test files only go test -count 1 ./...— no tests exist; this passes instantlygo test ./... -coverprofile=./coverage.out— threshold all 0%
YAML via --config / CLI_CONFIG. Env prefix CLI_ overrides file. Panics for on-chain commands without config.
Key flags: -k key type (ed25519|secp256k1|gost), -r response type, -w wait for batch event, -n request count, -t rate limit.
- zap, not logrus: README says logrus, actual code uses
go.uber.org/zap. - osv-scanner-config.toml: referenced in CI workflow but does not exist on disk.
- Dead commands: 9 cobra subcommands (
fetchBatch,chaincodeVersion,validateBlock, etc.) are fully implemented but commented out ofroot.goregistration. - Linter allowances: revive/staticcheck permit dot-imports for
onsi/gomegaandonsi/ginkgo/v2, but neither package is used anywhere.