Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang-queue-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5ed78a04
authored
Jan 03, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
init
parent
fcdae79c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
.gitignore
config/config.toml.demo
util/config.go
.gitignore
View file @
5ed78a04
/config/config.toml
/.idea
/.DS_Store
/logs/*
\ No newline at end of file
/logs/*
/config/*.toml
config/config.toml.demo
View file @
5ed78a04
...
...
@@ -15,3 +15,4 @@ send_mail="http://crm.liexin.net/api/sendCaiGouEmailByOrderAdmin"
[Ding_msg]
webhook="https://oapi.dingtalk.com/robot/send?access_token=ec03b2cba0d62ef0bd7b9ebb16aaf69b5f626658dfb6b194045381324b0786cf"
jingDiao="https://oapi.dingtalk.com/robot/send?access_token=eaeae1253e9c125a053bc8a7bcfec5096a23625a98044eaa346591863449ba17"
util/config.go
View file @
5ed78a04
...
...
@@ -10,6 +10,7 @@ type Config struct{
Liexin_databases
*
LiexinMysqlConfig
Rabbitmq_ichunt
*
RabbitmqIchunt
Crm_domain
*
SendMail
Ding_msg
*
Ding
}
...
...
@@ -29,13 +30,24 @@ type SendMail struct{
SendMailUrl
string
`toml:"send_mail"`
}
type
Ding
struct
{
Webhook
string
`toml:"webhook"`
JingDiao
string
`toml:"jingDiao"`
}
var
Configs
*
Config
=
new
(
Config
)
func
Init
(){
_
,
err
:=
toml
.
DecodeFile
(
"config/config.toml"
,
Configs
)
var
err
error
_
,
err
=
toml
.
DecodeFile
(
"config/config.toml"
,
Configs
)
_
,
err
=
toml
.
DecodeFile
(
"config/db.toml"
,
Configs
)
if
err
!=
nil
{
fmt
.
Println
(
err
)
}
fmt
.
Printf
(
"%+v"
,
Configs
.
Liexin_databases
)
fmt
.
Printf
(
"%+v"
,
Configs
.
Rabbitmq_ichunt
)
fmt
.
Printf
(
"%+v"
,
Configs
.
Crm_domain
)
fmt
.
Printf
(
"%+v"
,
Configs
.
Ding_msg
)
//fmt.Printf("%+v",Configs.Crm_domain)
//fmt.Printf("%+v",Configs.Rabbitmq_ichunt)
...
...
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