mirror of
https://github.com/luxfi/zapdb.git
synced 2026-07-26 22:46:36 +00:00
- 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)
12 lines
481 B
Bash
Executable File
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
|