From 8b0de5a71a02fb9fdb99b6df9959637aa768d126 Mon Sep 17 00:00:00 2001 From: "Derrick J. Wippler" Date: Mon, 3 Jun 2019 11:06:30 -0500 Subject: [PATCH] Changed module paths to reflect breaking change v2 --- CHANGELOG | 3 ++- go.mod | 2 +- groupcache.go | 6 +++--- groupcache_test.go | 4 ++-- http.go | 4 ++-- peers.go | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 175ceda..007739a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.0.0] - 2019-05-30 +## [2.0.0-rc.2] - 2019-06-03 ### Changes * Now using golang standard `context.Context` instead of `groupcache.Context`. * HTTP requests made by `httpGetter` now respect `context.Context` done. @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Now always populating the hotcache. A more complex algorithm is unnecessary when the LRU cache will ensure the most used values remain in the cache. The evict code ensures the hotcache does not overcrowd the maincache. +* Changed import paths to /v2 in accordance with go modules rules ## [1.3.0] - 2019-05-23 ### Added diff --git a/go.mod b/go.mod index 73c1011..da9f971 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/mailgun/groupcache +module github.com/mailgun/groupcache/v2 require github.com/golang/protobuf v1.3.1 diff --git a/groupcache.go b/groupcache.go index a45661c..833b7f1 100644 --- a/groupcache.go +++ b/groupcache.go @@ -32,9 +32,9 @@ import ( "sync/atomic" "time" - pb "github.com/mailgun/groupcache/groupcachepb" - "github.com/mailgun/groupcache/lru" - "github.com/mailgun/groupcache/singleflight" + pb "github.com/mailgun/groupcache/v2/groupcachepb" + "github.com/mailgun/groupcache/v2/lru" + "github.com/mailgun/groupcache/v2/singleflight" ) // A Getter loads data for a key. diff --git a/groupcache_test.go b/groupcache_test.go index 77402d7..e4ad028 100644 --- a/groupcache_test.go +++ b/groupcache_test.go @@ -31,8 +31,8 @@ import ( "github.com/golang/protobuf/proto" - pb "github.com/mailgun/groupcache/groupcachepb" - "github.com/mailgun/groupcache/testpb" + pb "github.com/mailgun/groupcache/v2/groupcachepb" + "github.com/mailgun/groupcache/v2/testpb" ) var ( diff --git a/http.go b/http.go index 39e0703..3b87c1c 100644 --- a/http.go +++ b/http.go @@ -28,8 +28,8 @@ import ( "sync" "github.com/golang/protobuf/proto" - "github.com/mailgun/groupcache/consistenthash" - pb "github.com/mailgun/groupcache/groupcachepb" + "github.com/mailgun/groupcache/v2/consistenthash" + pb "github.com/mailgun/groupcache/v2/groupcachepb" ) const defaultBasePath = "/_groupcache/" diff --git a/peers.go b/peers.go index 05847da..dbb8ae1 100644 --- a/peers.go +++ b/peers.go @@ -20,7 +20,7 @@ package groupcache import ( "context" - pb "github.com/mailgun/groupcache/groupcachepb" + pb "github.com/mailgun/groupcache/v2/groupcachepb" ) // ProtoGetter is the interface that must be implemented by a peer.