From a64f850c58a952a754c593e03cc65dacc1553bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kol=C3=A1rik?= Date: Wed, 12 Jun 2024 23:39:08 +0200 Subject: [PATCH] refactor: replace + with . in infinite links (#100) --- view/summary.go | 2 +- view/summary_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/view/summary.go b/view/summary.go index 75ba422..94a3ed3 100644 --- a/view/summary.go +++ b/view/summary.go @@ -43,7 +43,7 @@ func (v *viewer) OutputSummary() { if len(v.ctx.AggregatedStats) > 1 { v.printer.Println() // Add a newline in table view } - ids := v.ctx.History.ToString("+") + ids := v.ctx.History.ToString(".") if ids != "" { v.printer.Println(v.getShareMessage(ids)) } diff --git a/view/summary_test.go b/view/summary_test.go index 6d0d0de..28a8dd9 100644 --- a/view/summary_test.go +++ b/view/summary_test.go @@ -95,7 +95,7 @@ rtt min/avg/max/mdev = -/-/-/- ms viewer := NewViewer(ctx, NewPrinter(nil, w, w), nil, nil) viewer.OutputSummary() - expectedOutput := fmt.Sprintf("\n> View the results online: https://www.jsdelivr.com/globalping?measurement=%s+%s\n", measurementID1, measurementID2) + expectedOutput := fmt.Sprintf("\n> View the results online: https://www.jsdelivr.com/globalping?measurement=%s.%s\n", measurementID1, measurementID2) assert.Equal(t, expectedOutput, w.String()) })