Files
Hanzo Dev d5ea72f886 fix: Go 1.26 vet compliance, grpc build tag in proto gen
- Fix format string vet errors in db2_test.go and key_registry.go
  for Go 1.26 stricter printf checks
- Update pb/gen.sh to add //go:build grpc tag after protoc generation
  so protobuf types only compile with grpc tag (default uses ZAP
  native binary encoding from types_zap.go)
2026-03-11 22:45:10 -07:00

12 lines
481 B
Bash
Executable File

#!/bin/bash
# Run this script from its directory, so that badgerpb4.proto is where it's expected to
# be.
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0
protoc --go_out=. --go_opt=paths=source_relative badgerpb4.proto
# Add grpc build tag so protobuf types are only compiled when grpc tag is set.
# The default (non-grpc) build uses native binary encoding from types_zap.go.
sed -i.bak '1s/^/\/\/go:build grpc\n\n/' badgerpb4.pb.go && rm -f badgerpb4.pb.go.bak