Compare commits
3 Commits
discours-d
...
acc471e500
Author | SHA1 | Date | |
---|---|---|---|
acc471e500 | |||
586b2cc3af | |||
6a4b3553af |
@@ -35,6 +35,7 @@ func (u LogTextFormatter) Format(e *logrus.Entry) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if e.Caller != nil {
|
if e.Caller != nil {
|
||||||
|
fmt.Sprintf("%r", e)
|
||||||
file := filepath.Base(e.Caller.File)
|
file := filepath.Base(e.Caller.File)
|
||||||
line := e.Caller.Line
|
line := e.Caller.Line
|
||||||
return []byte(fmt.Sprintf("%s[%s] %s:%d %s%s\033[0m\n", color, level, file, line, message, color)), nil
|
return []byte(fmt.Sprintf("%s[%s] %s:%d %s%s\033[0m\n", color, level, file, line, message, color)), nil
|
||||||
|
@@ -234,10 +234,10 @@ func (c *provider) GetUserAppDataFromRedis(userId string) (string, error) {
|
|||||||
rkey := fmt.Sprintf("author:user:%s", userId)
|
rkey := fmt.Sprintf("author:user:%s", userId)
|
||||||
fmt.Println("get redis cached by key:", rkey)
|
fmt.Println("get redis cached by key:", rkey)
|
||||||
authorIdString, err := c.store.Get(c.ctx, rkey).Result()
|
authorIdString, err := c.store.Get(c.ctx, rkey).Result()
|
||||||
|
fmt.Println("redis found string value:", authorIdString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
fmt.Println("redis found string value:", authorIdString)
|
|
||||||
|
|
||||||
// Преобразуем ID автора из строки в int
|
// Преобразуем ID автора из строки в int
|
||||||
var authorIdFloat float64
|
var authorIdFloat float64
|
||||||
|
Reference in New Issue
Block a user