Skip to content

Commit 58913ca

Browse files
committed
修复部分情况下url不合法导致出现报错的bug
1 parent d62bbdf commit 58913ca

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

internal/runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func (r *Runner) Prepare(ctx context.Context) error {
234234
if err != nil {
235235
return err
236236
}
237-
r.Outputting()
237+
r.Output()
238238
return nil
239239
}
240240

@@ -347,7 +347,7 @@ func (r *Runner) PrintStat(pool *Pool) {
347347
}
348348
}
349349

350-
func (r *Runner) Outputting() {
350+
func (r *Runner) Output() {
351351
debugPrint := func(bl *pkg.Baseline) {
352352
if r.Color {
353353
logs.Log.Debug(bl.ColorString())

pkg/baseline.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ func NewBaseline(u, host string, resp *ihttp.Response) *Baseline {
5656
if err == nil {
5757
bl.Path = uu.Path
5858
bl.Url = uu
59-
}
60-
61-
if bl.Url.Host != host {
62-
bl.Host = host
59+
if bl.Url.Host != host {
60+
bl.Host = host
61+
}
6362
}
6463
bl.Unique = UniqueHash(bl)
6564
return bl

0 commit comments

Comments
 (0)