can't sort structs yet
This commit is contained in:
parent
3f81cca18c
commit
b9fec2e814
11
Makefile
11
Makefile
|
@ -3,18 +3,23 @@ BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
|
||||||
|
|
||||||
test: goimports build test
|
test: goimports build test
|
||||||
|
|
||||||
full: clean goimports auto vet install
|
full: clean goimports auto vet build
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
@GO111MODULE=off go vet
|
@GO111MODULE=off go vet
|
||||||
@echo this go binary package should build okay
|
@echo this go binary package should build okay
|
||||||
|
|
||||||
cleanbuild:
|
# autogen uses autogen to build. keep a working copy somewhere
|
||||||
rm -f auto.marshal.pb.go auto.sort.pb.go autogenpb
|
recover:
|
||||||
|
make clean
|
||||||
|
./autogenpb.last --proto file.proto --package main
|
||||||
|
make goimports
|
||||||
|
make build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
GO111MODULE=off go build \
|
GO111MODULE=off go build \
|
||||||
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||||
|
cp -f autogenpb autogenpb.${BUILDTIME}
|
||||||
|
|
||||||
bak:
|
bak:
|
||||||
mv -f autogenpb autogenpb.last
|
mv -f autogenpb autogenpb.last
|
||||||
|
|
|
@ -36,7 +36,7 @@ message MsgName {
|
||||||
repeated string unique = 8; // if the fields should have AppendUnique() functions
|
repeated string unique = 8; // if the fields should have AppendUnique() functions
|
||||||
}
|
}
|
||||||
|
|
||||||
message File { // `autogenpb:nomarshal`
|
message File {
|
||||||
string Package = 1; // whatever the package name is at the top of the .go file
|
string Package = 1; // whatever the package name is at the top of the .go file
|
||||||
string filename = 2; // yellow.proto
|
string filename = 2; // yellow.proto
|
||||||
string pbfilename = 3; // yellow.pb.go
|
string pbfilename = 3; // yellow.pb.go
|
||||||
|
@ -47,7 +47,7 @@ message File { // `autogenpb:nomarshal`
|
||||||
MsgName base = 8; // the primary repeated message for the master struct
|
MsgName base = 8; // the primary repeated message for the master struct
|
||||||
|
|
||||||
// every struct in this proto file, this file has: "Apple", "Apples", ... "File", etc...
|
// every struct in this proto file, this file has: "Apple", "Apples", ... "File", etc...
|
||||||
repeated MsgName msgNames = 9; // `autogenpb:unique` // in this file
|
repeated MsgName msgNames = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
// I know, I know, the whole point of using protobuf
|
// I know, I know, the whole point of using protobuf
|
||||||
|
|
Loading…
Reference in New Issue