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
8718709a
Commit
8718709a
authored
Oct 31, 2022
by
zhengqiuyun86
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
httpClient封装
parent
6676796c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
conf.go
conf/conf.go
+4
-16
No files found.
conf/conf.go
View file @
8718709a
package
conf
import
(
"git.168cad.top/zhengqiuyun/rym-util/exception"
"git.168cad.top/zhengqiuyun/rym-util/util"
)
...
...
@@ -22,21 +21,10 @@ type Config struct {
}
func
BaseConfig
(
conf
Config
)
{
if
util
.
IsEmpty
(
&
conf
.
ServerName
)
{
exception
.
ThrowsErrS
(
"SYSTEM_ERR"
,
"ServerName error"
)
}
else
{
ServerName
=
conf
.
ServerName
}
if
util
.
IsEmpty
(
&
conf
.
Env
)
{
panic
(
"Env error"
)
}
else
{
Env
=
conf
.
Env
}
if
conf
.
HttpPort
<
1024
{
panic
(
"HttpPort error"
)
}
else
{
HttpPort
=
conf
.
HttpPort
}
ServerName
=
conf
.
ServerName
Env
=
conf
.
Env
HttpPort
=
conf
.
HttpPort
if
util
.
IsEmpty
(
&
conf
.
LogLevel
)
{
LogLevel
=
"DEBUG"
}
else
{
...
...
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