mirror of
https://github.com/ehang-io/nps.git
synced 2026-11-03 02:20:50 +08:00
Code optimization
This commit is contained in:
1 parent
efa341c7e8
commit
b189fb1b6e
260 files changed
+50746
-851
No files matched your search
@@ -146,7 +146,12 @@ func dealCommon(s string) *CommonConfig {
|
||||
func dealHost(s string) *file.Host {
|
||||
h := &file.Host{}
|
||||
var headerChange string
|
||||
for _, v := range strings.Split(s, "\n") {
|
||||
var configDataArr []string
|
||||
configDataArr = strings.Split(s, "\n")
|
||||
if len(configDataArr) < 3 {
|
||||
configDataArr = strings.Split(s, "\r\n")
|
||||
}
|
||||
for _, v := range configDataArr {
|
||||
item := strings.Split(v, "=")
|
||||
if len(item) == 0 {
|
||||
continue
|
||||
|
||||
Reference in new issue
Block a user