Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
search_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
057d86dd
authored
Jun 17, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修整启动项
parent
4ecfdd6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
boot/app.go
cmd/search_http_server.go
boot/app.go
View file @
057d86dd
...
...
@@ -4,23 +4,21 @@ import (
"search_server/pkg/config"
"search_server/pkg/gredis"
"search_server/pkg/logger"
"search_server/pkg/mongo"
"search_server/pkg/mysql"
)
func
Boot
(
configPath
string
)
(
err
error
)
{
if
err
=
config
.
SetUp
(
configPath
);
err
!=
nil
{
panic
(
err
)
}
if
err
=
mysql
.
Setup
();
err
!=
nil
{
return
}
//
if err = mysql.Setup(); err != nil {
//
return
//
}
if
err
=
gredis
.
Setup
();
err
!=
nil
{
return
}
if
err
=
mongo
.
SetUp
();
err
!=
nil
{
return
}
//
if err = mongo.SetUp(); err != nil {
//
return
//
}
if
err
=
logger
.
SetUp
();
err
!=
nil
{
return
}
...
...
cmd/search_http_server.go
View file @
057d86dd
...
...
@@ -17,7 +17,7 @@ func main() {
if
err
:=
boot
.
Boot
(
path
);
err
!=
nil
{
panic
(
err
)
}
gin
.
SetMode
(
config
.
Get
(
"web.mode"
)
.
String
())
r
:=
gin
.
New
()
gin_
.
BootStrap
(
r
)
...
...
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