Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rym-util
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengqiuyun
rym-util
Commits
f4ab4b6a
Commit
f4ab4b6a
authored
Aug 10, 2022
by
zhengqiuyun86
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化
parent
f4266832
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
main.go
main.go
+1
-1
RedisClient.go
redis/RedisClient.go
+9
-0
No files found.
main.go
View file @
f4ab4b6a
...
@@ -17,6 +17,6 @@ func main() {
...
@@ -17,6 +17,6 @@ func main() {
mysqlrym
.
TestLog
()
mysqlrym
.
TestLog
()
es
.
TestLog
()
es
.
TestLog
()
redis
.
TestLog
()
redis
.
TestLog
()
c
:=
router
.
InitGinEngine
()
c
:=
router
.
InitGinEngine
(
true
)
router
.
Run
(
c
)
router
.
Run
(
c
)
}
}
redis/RedisClient.go
View file @
f4ab4b6a
...
@@ -62,6 +62,15 @@ func GetString(key string) string {
...
@@ -62,6 +62,15 @@ func GetString(key string) string {
return
r
.
Val
()
return
r
.
Val
()
}
}
func
Get
(
key
string
)
[]
byte
{
r
:=
redisClient
.
Get
(
key
)
rByte
,
err
:=
r
.
Bytes
()
if
err
!=
nil
{
log
.
Error
(
fmt
.
Sprintf
(
"获取缓存错误:%s"
,
err
.
Error
()))
}
return
rByte
}
func
Set
(
k
string
,
v
string
)
{
func
Set
(
k
string
,
v
string
)
{
redisClient
.
Set
(
k
,
v
,
0
)
redisClient
.
Set
(
k
,
v
,
0
)
log
.
Debug
(
fmt
.
Sprintf
(
"设置缓存成功:%s %s"
,
k
,
v
))
log
.
Debug
(
fmt
.
Sprintf
(
"设置缓存成功:%s %s"
,
k
,
v
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment