autogenpb now fully automatic
This commit is contained in:
parent
e4b150d6aa
commit
13a292dd42
5
Makefile
5
Makefile
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue