From a4a77c70886c5e2f47c9b9b6068c5da36a3ff6f1 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 13 Apr 2018 16:21:17 +0900 Subject: [PATCH] ing --- servlet/auth-servlet.go | 4 ++-- servlet/data-servlet.go | 12 ++++++------ servlet/probe-servlet.go | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/servlet/auth-servlet.go b/servlet/auth-servlet.go index 0014dfe..6dc765b 100644 --- a/servlet/auth-servlet.go +++ b/servlet/auth-servlet.go @@ -78,7 +78,7 @@ func (s *AuthServlets) Handshake(servletCtx server.ServletCtx, ctx *fasthttp.Req case ocnc.HTTPRequestHeaderValue_NoAuthProbe_Method_Regist: bInfo := ctx.Request.Header.Peek(ocnc.HTTPRequestHeaderKey_NoAuthProbe_Info) if nil == bInfo { - return nil, fmt.Errorf("Unexpected HTTPRequestHeaderKey NoAuthProbe Info") + return nil, fmt.Errorf("Unexpected Request Header Key NoAuthProbe Info") } rJSON := make([]byte, base64.StdEncoding.DecodedLen(len(bInfo))) _, err := base64.StdEncoding.Decode(rJSON, bInfo) @@ -122,7 +122,7 @@ func (s *AuthServlets) Handshake(servletCtx server.ServletCtx, ctx *fasthttp.Req return nil, nil default: - return nil, fmt.Errorf("Unexpected noauth probe httpRequestHeaderValue: %v", method) + return nil, fmt.Errorf("Unexpected noauth probe method: %s", method) } } diff --git a/servlet/data-servlet.go b/servlet/data-servlet.go index a9e4ec3..2066ea6 100644 --- a/servlet/data-servlet.go +++ b/servlet/data-servlet.go @@ -1,20 +1,20 @@ package servlet import ( - "fmt" - "encoding/json" "context" "crypto/rsa" + "encoding/json" + "fmt" "sync" "github.com/valyala/fasthttp" "git.loafle.net/commons/server-go" "git.loafle.net/commons/server-go/socket" - "git.loafle.net/overflow/gateway/external/grpc" - og "git.loafle.net/overflow/gateway" ocpc "git.loafle.net/overflow/commons-go/probe/constants" ocpm "git.loafle.net/overflow/commons-go/probe/model" + og "git.loafle.net/overflow/gateway" + "git.loafle.net/overflow/gateway/external/grpc" ogrs "git.loafle.net/overflow/gateway_rpc/servlet" ) @@ -69,7 +69,7 @@ func (s *DataServlets) Handshake(servletCtx server.ServletCtx, ctx *fasthttp.Req switch method { case ocpc.HTTPRequestHeaderValue_Probe_Method_Connect: default: - return nil, fmt.Errorf("Unexpected noauth probe httpRequestHeaderValue: %v", method) + return nil, fmt.Errorf("Unexpected probe method: %s", method) } bProbeKey := ctx.Request.Header.Peek(ocpc.HTTPRequestHeaderKey_Probe_ProbeKey) @@ -107,4 +107,4 @@ func (s *DataServlets) OnConnect(servletCtx server.ServletCtx, conn socket.Conn) func (s *DataServlets) OnDisconnect(servletCtx server.ServletCtx) { s.RPCServlets.OnDisconnect(servletCtx) -} \ No newline at end of file +} diff --git a/servlet/probe-servlet.go b/servlet/probe-servlet.go index 47f06ab..16a82f4 100644 --- a/servlet/probe-servlet.go +++ b/servlet/probe-servlet.go @@ -75,7 +75,7 @@ func (s *ProbeServlets) Handshake(servletCtx server.ServletCtx, ctx *fasthttp.Re switch method { case ocpc.HTTPRequestHeaderValue_Probe_Method_Connect: default: - return nil, fmt.Errorf("Unexpected noauth probe httpRequestHeaderValue: %v", method) + return nil, fmt.Errorf("Unexpected probe method: %s", method) } bProbeKey := ctx.Request.Header.Peek(ocpc.HTTPRequestHeaderKey_Probe_ProbeKey)