更改代码顺序,提高代码性能 (#291)

Co-authored-by: chixl <chixl@t3go.cn>
This commit is contained in:
chixianliangGithub 2020-09-02 15:05:38 +08:00 committed by GitHub
parent 50f5c6a98d
commit a8357dffb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -79,15 +79,14 @@ func EndpointImport(endpoints []string) error {
arr := strings.Split(endpoints[i], "::")
ident := strings.TrimSpace(arr[0])
alias := ""
if len(arr) == 2 {
alias = strings.TrimSpace(arr[1])
}
if ident == "" {
continue
}
alias := ""
if len(arr) == 2 {
alias = strings.TrimSpace(arr[1])
}
err := endpointImport(session, ident, alias)
if err != nil {
return err