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
24152d41
Commit
24152d41
authored
Aug 10, 2022
by
zhengqiuyun86
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化
parent
0dde3495
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
conf.go
conf/conf.go
+2
-1
RedisClient.go
redis/RedisClient.go
+1
-1
No files found.
conf/conf.go
View file @
24152d41
...
@@ -63,7 +63,8 @@ var LogShowSql = true
...
@@ -63,7 +63,8 @@ var LogShowSql = true
//Redis conf
//Redis conf
type
RedisConf
struct
{
type
RedisConf
struct
{
RedisAddr
string
RedisHost
string
RedisPort
int
RedisPwd
string
RedisPwd
string
RedisDb
int
RedisDb
int
}
}
...
...
redis/RedisClient.go
View file @
24152d41
...
@@ -17,7 +17,7 @@ var redisClient *redis.Client
...
@@ -17,7 +17,7 @@ var redisClient *redis.Client
func
init
()
{
func
init
()
{
redisClient
=
redis
.
NewClient
(
&
redis
.
Options
{
redisClient
=
redis
.
NewClient
(
&
redis
.
Options
{
Addr
:
conf
.
Redis
.
RedisAddr
,
Addr
:
fmt
.
Sprintf
(
"%s:%d"
,
conf
.
Redis
.
RedisHost
,
conf
.
Redis
.
RedisPort
)
,
Password
:
conf
.
Redis
.
RedisPwd
,
Password
:
conf
.
Redis
.
RedisPwd
,
DB
:
conf
.
Redis
.
RedisDb
,
// redis一共16个库,指定其中一个库即可
DB
:
conf
.
Redis
.
RedisDb
,
// redis一共16个库,指定其中一个库即可
})
})
...
...
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