Skip to content
Snippets Groups Projects
Commit 679a8e69 authored by vito.he's avatar vito.he Committed by GitHub
Browse files

Merge pull request #266 from imxyb/bugfix/return-error

should return error when `NewURL` failed.
parents 9eedf707 d457c813
No related branches found
No related tags found
No related merge requests found
...@@ -134,14 +134,14 @@ func serviceItemToUrls(item ConfigItem, config ConfiguratorConfig) ([]*common.UR ...@@ -134,14 +134,14 @@ func serviceItemToUrls(item ConfigItem, config ConfiguratorConfig) ([]*common.UR
newUrlStr = newUrlStr + v newUrlStr = newUrlStr + v
url, err := common.NewURL(context.Background(), newUrlStr) url, err := common.NewURL(context.Background(), newUrlStr)
if err != nil { if err != nil {
perrors.WithStack(err) return nil, perrors.WithStack(err)
} }
urls = append(urls, &url) urls = append(urls, &url)
} }
} else { } else {
url, err := common.NewURL(context.Background(), urlStr) url, err := common.NewURL(context.Background(), urlStr)
if err != nil { if err != nil {
perrors.WithStack(err) return nil, perrors.WithStack(err)
} }
urls = append(urls, &url) urls = append(urls, &url)
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment