From 0a3b401a6947c392fc618c4972c9cae125f47233 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Tue, 2 Aug 2016 19:31:57 -0400 Subject: [PATCH] oh, so that's how 'go generate' works. --- main.go | 2 ++ message.go | 3 +++ mkprotos | 3 +++ 3 files changed, 8 insertions(+) diff --git a/main.go b/main.go index 6b4b776..df9c36e 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,7 @@ package main +//go:generate ./mkprotos + import ( "compress/bzip2" "flag" diff --git a/message.go b/message.go index 5b3f178..8f6acba 100644 --- a/message.go +++ b/message.go @@ -9,6 +9,9 @@ import ( "github.com/jordanorelli/hyperstone/dota" ) +// message represents the top-level envelope in the dota replay format. Each +// datum is contained within a message envelope. Each message envelope is at +// most 1<<16 bytes. type message struct { cmd dota.EDemoCommands tick int64 diff --git a/mkprotos b/mkprotos index e503693..6a29b15 100755 --- a/mkprotos +++ b/mkprotos @@ -6,6 +6,9 @@ echo "Did you update the GameTracking submodule? You want to do that." echo "clearing existing proto files in ./dota" rm dota/*.proto +echo "clearing existing generated go files in ./dota" +rm dota/*.pb.go + echo "copying protos from GameTracking/Protobufs/dota" cp GameTracking/Protobufs/dota/*.proto ./dota