diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2020-03-17 00:52:11 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2020-03-17 00:52:11 +0300 |
commit | 650d33be0d5f3140f837ca307a345fffed439c91 (patch) | |
tree | 2b528a0a742e46aabee5306add0b62c944b09478 /auth | |
parent | ddbf8c44360bf5cffd9c8b2d7fbbf73be6e17677 (diff) |
Improving of static check analyze.
`unused` linter was enabled to report about unused code.
Unused code removed.
Diffstat (limited to 'auth')
-rw-r--r-- | auth/rpccredentials.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/auth/rpccredentials.go b/auth/rpccredentials.go index 4b7acc7b2..923ee8567 100644 --- a/auth/rpccredentials.go +++ b/auth/rpccredentials.go @@ -17,16 +17,6 @@ func RPCCredentials(sharedSecret string) credentials.PerRPCCredentials { return &rpcCredentialsV2{sharedSecret: sharedSecret} } -type rpcCredentials struct { - sharedSecret string -} - -func (*rpcCredentials) RequireTransportSecurity() bool { return false } - -func (rc *rpcCredentials) GetRequestMetadata(context.Context, ...string) (map[string]string, error) { - return map[string]string{"authorization": "Bearer " + rc.sharedSecret}, nil -} - // RPCCredentialsV2 can be used with grpc.WithPerRPCCredentials to create // a grpc.DialOption that inserts an V2 (HMAC) token with the current // timestamp for authentication with a Gitaly server. The shared secret |