Skip to content

Commit

Permalink
Merge pull request #1 from adzil/chore/upgrade-proto
Browse files Browse the repository at this point in the history
chore: upgrade proto package
  • Loading branch information
adzil authored Jun 26, 2023
2 parents cc3d361 + 048ce0e commit 34be840
Show file tree
Hide file tree
Showing 17 changed files with 989 additions and 305 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ modifications.
groupcache is a caching and cache-filling library, intended as a
replacement for memcached in many cases.

For API docs and examples, see http://godoc.org/github.com/mailgun/groupcache/v2
For API docs and examples, see http://godoc.org/github.com/adzil/groupcache/v2


### Modifications from original library
Expand Down Expand Up @@ -87,7 +87,7 @@ import (
"log"
"time"

"github.com/mailgun/groupcache/v2"
"github.com/adzil/groupcache/v2"
)

func ExampleUsage() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"syscall"
"time"

"github.com/mailgun/groupcache/v2"
"github.com/adzil/groupcache/v2"
)

var store = map[string]string{}
Expand Down
197 changes: 140 additions & 57 deletions example_pb_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"time"

"github.com/mailgun/groupcache/v2"
"github.com/adzil/groupcache/v2"
)

func ExampleUsage() {
Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
module github.com/mailgun/groupcache/v2
module github.com/adzil/groupcache/v2

go 1.19

require (
github.com/golang/protobuf v1.5.2
github.com/segmentio/fasthash v1.0.3
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.1
google.golang.org/protobuf v1.28.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand All @@ -27,7 +25,6 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0=
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
6 changes: 3 additions & 3 deletions groupcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ import (
"sync/atomic"
"time"

pb "github.com/mailgun/groupcache/v2/groupcachepb"
"github.com/mailgun/groupcache/v2/lru"
"github.com/mailgun/groupcache/v2/singleflight"
pb "github.com/adzil/groupcache/v2/groupcachepb"
"github.com/adzil/groupcache/v2/lru"
"github.com/adzil/groupcache/v2/singleflight"
"github.com/sirupsen/logrus"
)

Expand Down
12 changes: 6 additions & 6 deletions groupcache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ import (
"errors"
"fmt"
"hash/crc32"
"reflect"
"sync"
"testing"
"time"
"unsafe"

"github.com/golang/protobuf/proto"
pb "github.com/mailgun/groupcache/v2/groupcachepb"
"github.com/mailgun/groupcache/v2/testpb"
pb "github.com/adzil/groupcache/v2/groupcachepb"
"github.com/adzil/groupcache/v2/testpb"
"github.com/stretchr/testify/assert"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/proto"
)

var (
Expand Down Expand Up @@ -161,8 +161,8 @@ func TestGetDupSuppressProto(t *testing.T) {
for i := 0; i < 2; i++ {
select {
case v := <-resc:
if !reflect.DeepEqual(v, want) {
t.Errorf(" Got: %v\nWant: %v", proto.CompactTextString(v), proto.CompactTextString(want))
if !proto.Equal(v, want) {
t.Errorf(" Got: %v\nWant: %v", prototext.Format(v), prototext.Format(want))
}
case <-time.After(5 * time.Second):
t.Errorf("timeout waiting on getter #%d of 2", i+1)
Expand Down
4 changes: 2 additions & 2 deletions groupcachepb/example.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

option go_package = "groupcache_test";
option go_package = "github.com/adzil/groupcache/groupcache_test";

package groupcachepb;

Expand All @@ -9,4 +9,4 @@ message User {
string name = 2;
int64 age = 3;
bool is_super = 4;
}
}
Loading

0 comments on commit 34be840

Please sign in to comment.