mirror of
https://github.com/Luzifer/ots.git
synced 2025-07-22 06:08:51 -04:00
CI: Add code linting (#118)
This commit is contained in:
parent
546481dcfc
commit
8540d4016c
8 changed files with 200 additions and 14 deletions
|
@ -53,14 +53,14 @@ func (s storageRedis) ReadAndDestroy(id string) (string, error) {
|
|||
if errors.Is(err, redis.Nil) {
|
||||
return "", errSecretNotFound
|
||||
}
|
||||
return "", err
|
||||
return "", errors.Wrap(err, "getting key")
|
||||
}
|
||||
|
||||
err = s.conn.Del(context.Background(), s.redisKey(id)).Err()
|
||||
return string(secret), errors.Wrap(err, "deleting key")
|
||||
return secret, errors.Wrap(err, "deleting key")
|
||||
}
|
||||
|
||||
func (s storageRedis) redisKey(id string) string {
|
||||
func (storageRedis) redisKey(id string) string {
|
||||
prefix := redisDefaultPrefix
|
||||
if prfx := os.Getenv("REDIS_KEY"); prfx != "" {
|
||||
prefix = prfx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue