autogenpb now fully automatic

This commit is contained in:
Jeff Carr 2024-12-01 22:24:24 -06:00
parent e4b150d6aa
commit 13a292dd42
3 changed files with 6 additions and 3 deletions

View File

@ -10,7 +10,6 @@ all: package.pb.go machine.pb.go vet
vet: vet:
@GO111MODULE=off go vet @GO111MODULE=off go vet
@echo this go library package builds okay @echo this go library package builds okay
GO111MODULE=off go vet
# autofixes your import headers in your golang files # autofixes your import headers in your golang files
goimports: goimports:
@ -26,7 +25,7 @@ clean:
-rm -f go.* -rm -f go.*
package.pb.go: package.proto package.pb.go: package.proto
autogenpb --proto package.proto --mutex autogenpb --proto package.proto
machine.pb.go: machine.proto machine.pb.go: machine.proto
autogenpb --proto machine.proto --mutex autogenpb --proto machine.proto

View File

@ -5,6 +5,8 @@ package gitpb;
import "package.proto"; import "package.proto";
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
// global settings for autogenpb `autogenpb:mutex`
message Machine { // `autogenpb:marshal` message Machine { // `autogenpb:marshal`
string hostname = 1; // `autogenpb:unique` string hostname = 1; // `autogenpb:unique`
int64 memory = 2; int64 memory = 2;

View File

@ -5,6 +5,8 @@ package gitpb;
// import "google/protobuf/duration.proto"; // Import the well-known type for Timestamp // import "google/protobuf/duration.proto"; // Import the well-known type for Timestamp
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
// global settings for autogenpb `autogenpb:mutex`
message Package { message Package {
string name = 1; // `autogenpb:unique` // name: zookeeper-go string name = 1; // `autogenpb:unique` // name: zookeeper-go
string version = 2; // version: 0.0.3 string version = 2; // version: 0.0.3