Skip to content

Commit

Permalink
优化注释解析
Browse files Browse the repository at this point in the history
  • Loading branch information
shiguanghuxian committed Nov 20, 2021
1 parent e93eb52 commit fa0315d
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 168 deletions.
8 changes: 8 additions & 0 deletions lib/golib/golib.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ func SetAddressBook(str *string) {
if strings.HasPrefix(v, "#") {
continue
}
vArr := strings.Split(v, "#")
if len(vArr) > 1 {
v = strings.TrimSpace(vArr[0])
}
arr := strings.Fields(v)
if len(arr) != 2 {
continue
Expand All @@ -62,6 +66,10 @@ func SetPublicDnsServer(str *string) {
if strings.HasPrefix(v, "#") {
continue
}
vArr := strings.Split(v, "#")
if len(vArr) > 1 {
v = strings.TrimSpace(vArr[0])
}
if v != "" {
addrs = append(addrs, v)
}
Expand Down
80 changes: 0 additions & 80 deletions lib/golib/libdns.h

This file was deleted.

Binary file modified macos/dylib/libdns.dylib
Binary file not shown.
Loading

0 comments on commit fa0315d

Please sign in to comment.