From 1471db2f64bbcf2d155a78a298326e433df0a7d0 Mon Sep 17 00:00:00 2001 From: kenriortega Date: Thu, 11 Nov 2021 11:56:27 -0500 Subject: [PATCH] ref: remove unused code for save key on localfiles --- internal/proxy/domain/proxyrepository.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/internal/proxy/domain/proxyrepository.go b/internal/proxy/domain/proxyrepository.go index d28bfc6..acc63bc 100644 --- a/internal/proxy/domain/proxyrepository.go +++ b/internal/proxy/domain/proxyrepository.go @@ -52,26 +52,6 @@ func (r ProxyRepositoryStorage) SaveKEY(engine, key, apikey string) error { if _, err := r.clientRdb.HSet(context.TODO(), key, apikey).Result(); err != nil { logger.LogError(errors.Errorf("proxy redis: %v", err).Error()) } - // r.clientRdb.Expire(context.TODO(), key, 24*time.Hour) - // case "local": - // f, err := os.Create("./apikey") - - // if err != nil { - // logger.LogError(errors.ErrSavekeyCreateLocal.Error()) - // return errors.ErrSavekeyCreateLocal - // } - - // // defer f.Close() - - // data := []byte(fmt.Sprintf("%s:%s", key, apikey)) - - // _, err = f.Write(data) - - // if err != nil { - // logger.LogError(errors.ErrSavekeyWriteOnLocal.Error()) - // return errors.ErrSavekeyWriteOnLocal - // } - // return nil } return nil }