From e3e545e22ef92af9e4f06096639ad2cff1856ac2 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Sun, 11 Dec 2016 21:36:01 -0500 Subject: [PATCH] stopper: move to pkg package This also adds a package docs for the stopper package. --- middleware/jwt/jwt.go | 2 +- middleware/middleware.go | 2 +- {stopper => pkg/stopper}/stopper.go | 1 + storage/storage.go | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) rename {stopper => pkg/stopper}/stopper.go (96%) diff --git a/middleware/jwt/jwt.go b/middleware/jwt/jwt.go index 5674ceb..721fde2 100644 --- a/middleware/jwt/jwt.go +++ b/middleware/jwt/jwt.go @@ -23,7 +23,7 @@ import ( "github.com/chihaya/chihaya/bittorrent" "github.com/chihaya/chihaya/middleware" - "github.com/chihaya/chihaya/stopper" + "github.com/chihaya/chihaya/pkg/stopper" ) var ( diff --git a/middleware/middleware.go b/middleware/middleware.go index 5321a62..2911799 100644 --- a/middleware/middleware.go +++ b/middleware/middleware.go @@ -9,7 +9,7 @@ import ( log "github.com/Sirupsen/logrus" "github.com/chihaya/chihaya/bittorrent" "github.com/chihaya/chihaya/frontend" - "github.com/chihaya/chihaya/stopper" + "github.com/chihaya/chihaya/pkg/stopper" "github.com/chihaya/chihaya/storage" ) diff --git a/stopper/stopper.go b/pkg/stopper/stopper.go similarity index 96% rename from stopper/stopper.go rename to pkg/stopper/stopper.go index 5a6948a..ed302d7 100644 --- a/stopper/stopper.go +++ b/pkg/stopper/stopper.go @@ -1,3 +1,4 @@ +// Package stopper implements a pattern for shutting down a group of processes. package stopper import ( diff --git a/storage/storage.go b/storage/storage.go index b2f7020..87c8782 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -2,7 +2,7 @@ package storage import ( "github.com/chihaya/chihaya/bittorrent" - "github.com/chihaya/chihaya/stopper" + "github.com/chihaya/chihaya/pkg/stopper" ) // ErrResourceDoesNotExist is the error returned by all delete methods in the