diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2020-05-25 08:05:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-25 08:05:01 -0700 |
| commit | bf86e38f9a148e20ac7ab8d178c643593dcf563f (patch) | |
| tree | a1830f9e5a8b25be8a4e80aea7f75bbedea6fd22 | |
| parent | 8dfaaeabfd97efff0e17af5cdf5b2d647bdb9b88 (diff) | |
| parent | ecdeef8c66eadbf9b4e8ac7f221444d1d92a9de0 (diff) | |
| download | seaweedfs-bf86e38f9a148e20ac7ab8d178c643593dcf563f.tar.xz seaweedfs-bf86e38f9a148e20ac7ab8d178c643593dcf563f.zip | |
Merge pull request #1329 from bingoohuang/master
fix build error
| -rw-r--r-- | unmaintained/volume_tailer/volume_tailer.go | 3 | ||||
| -rw-r--r-- | weed/security/guard.go | 2 | ||||
| -rw-r--r-- | weed/server/master_server.go | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/unmaintained/volume_tailer/volume_tailer.go b/unmaintained/volume_tailer/volume_tailer.go index 3c2d36d22..d9220d2de 100644 --- a/unmaintained/volume_tailer/volume_tailer.go +++ b/unmaintained/volume_tailer/volume_tailer.go @@ -9,7 +9,6 @@ import ( "github.com/chrislusf/seaweedfs/weed/security" "github.com/chrislusf/seaweedfs/weed/storage/needle" util2 "github.com/chrislusf/seaweedfs/weed/util" - "github.com/spf13/viper" "golang.org/x/tools/godoc/util" ) @@ -25,7 +24,7 @@ func main() { flag.Parse() util2.LoadConfiguration("security", false) - grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client") + grpcDialOption := security.LoadClientTLS(util2.GetViper(), "grpc.client") vid := needle.VolumeId(*volumeId) diff --git a/weed/security/guard.go b/weed/security/guard.go index 17fe2ea9e..87ec91ec1 100644 --- a/weed/security/guard.go +++ b/weed/security/guard.go @@ -62,7 +62,7 @@ func NewGuard(whiteList []string, signingKey string, expiresAfterSec int, readSi return g } -func (g *Guard) WhiteList(f func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) { +func (g *Guard) WhiteList(f http.HandlerFunc) http.HandlerFunc { if !g.isWriteActive { //if no security needed, just skip all checking return f diff --git a/weed/server/master_server.go b/weed/server/master_server.go index 82b306fc4..53ac7b2e2 100644 --- a/weed/server/master_server.go +++ b/weed/server/master_server.go @@ -156,7 +156,7 @@ func (ms *MasterServer) SetRaftServer(raftServer *RaftServer) { } } -func (ms *MasterServer) proxyToLeader(f func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) { +func (ms *MasterServer) proxyToLeader(f http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { if ms.Topo.IsLeader() { f(w, r) |
