From e72846e0643324ad6686157674731c267b608ce5 Mon Sep 17 00:00:00 2001 From: "Derrick J. Wippler" Date: Tue, 9 Apr 2019 17:36:47 -0500 Subject: [PATCH] Added support for go modules --- .gitignore | 1 + go.mod | 3 +++ go.sum | 2 ++ proto.sh | 12 ++++++++++++ 4 files changed, 18 insertions(+) create mode 100644 go.mod create mode 100644 go.sum create mode 100755 proto.sh diff --git a/.gitignore b/.gitignore index b25c15b..1f2b28d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *~ +.idea/ diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..ddca6aa --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/golang/groupcache + +require github.com/golang/protobuf v1.3.1 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..092b956 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/proto.sh b/proto.sh new file mode 100755 index 0000000..ebdba0a --- /dev/null +++ b/proto.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +# Make sure the script fails fast. +set -e +set -u +set -x + +PROTO_DIR=groupcachepb + +protoc -I=$PROTO_DIR \ + --go_out=$PROTO_DIR \ + $PROTO_DIR/groupcache.proto