Skip to content

Commit 582c35f

Browse files
misc: fix typos in the code (#104)
Co-authored-by: Martin Kolárik <[email protected]>
1 parent 40721c4 commit 582c35f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ coverage.html
3838

3939
dist/
4040

41-
# binaries not commited
41+
# binaries not committed
4242
bin/

cmd/ping.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (r *Root) RunPing(cmd *cobra.Command, args []string) error {
9898

9999
func (r *Root) pingInfinite(opts *globalping.MeasurementCreate) error {
100100
if r.ctx.Limit > 5 {
101-
return fmt.Errorf("continous mode is currently limited to 5 probes")
101+
return fmt.Errorf("continuous mode is currently limited to 5 probes")
102102
}
103103

104104
var err error

view/infinite.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ func (v *viewer) outputStreamingPackets(m *globalping.Measurement) error {
4545
probeMeasurement := &m.Results[0]
4646
hm := v.ctx.History.Find(m.ID)
4747
if probeMeasurement.Result.RawOutput != "" {
48-
concurentStats := v.aggregateConcurentStats(v.ctx.AggregatedStats[0], 0, m.ID)
49-
parsedOutput := v.parsePingRawOutput(hm, probeMeasurement, concurentStats.Sent)
48+
concurrentStats := v.aggregateConcurrentStats(v.ctx.AggregatedStats[0], 0, m.ID)
49+
parsedOutput := v.parsePingRawOutput(hm, probeMeasurement, concurrentStats.Sent)
5050
if len(hm.Stats) == 0 {
5151
hm.Stats = make([]*MeasurementStats, 1)
5252
}
@@ -134,7 +134,7 @@ func (v *viewer) generateTable(hm *HistoryItem, m *globalping.Measurement, areaW
134134
parsedOutput := v.parsePingRawOutput(hm, probeMeasurement, -1)
135135
newAggregatedStats[i] = mergeMeasurementStats(*v.ctx.AggregatedStats[i], parsedOutput.Stats)
136136
newStats[i] = parsedOutput.Stats
137-
row := getRowValues(v.aggregateConcurentStats(newAggregatedStats[i], i, m.ID))
137+
row := getRowValues(v.aggregateConcurrentStats(newAggregatedStats[i], i, m.ID))
138138
rowWidth := 0
139139
for j := 1; j < len(row); j++ {
140140
rowWidth += len(row[j]) + len(colSeparator)
@@ -188,7 +188,7 @@ func (v *viewer) generateTable(hm *HistoryItem, m *globalping.Measurement, areaW
188188
return &output, newStats, newAggregatedStats
189189
}
190190

191-
func (v *viewer) aggregateConcurentStats(completed *MeasurementStats, probeIndex int, excludeId string) *MeasurementStats {
191+
func (v *viewer) aggregateConcurrentStats(completed *MeasurementStats, probeIndex int, excludeId string) *MeasurementStats {
192192
inProgressStats := v.ctx.History.FilterByStatus(globalping.StatusInProgress)
193193
for i := range inProgressStats {
194194
if inProgressStats[i].Id == excludeId {

view/infinite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Nuremberg, DE, EU, Hetzner Online GmbH (AS0) | 2 | 0.00% | 4.07 ms | 4.
268268
assert.Equal(t, expectedOutput, w.String())
269269
}
270270

271-
func Test_OutputInfinite_MultipleProbes_MultipleConcurentCalls(t *testing.T) {
271+
func Test_OutputInfinite_MultipleProbes_MultipleConcurrentCalls(t *testing.T) {
272272
ctrl := gomock.NewController(t)
273273
defer ctrl.Finish()
274274

view/summary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func (v *viewer) OutputSummary() {
1111
}
1212

1313
if len(v.ctx.AggregatedStats) == 1 {
14-
stats := v.aggregateConcurentStats(v.ctx.AggregatedStats[0], 0, "")
14+
stats := v.aggregateConcurrentStats(v.ctx.AggregatedStats[0], 0, "")
1515

1616
v.printer.Printf("\n--- %s ping statistics ---\n", v.ctx.Hostname)
1717
v.printer.Printf("%d packets transmitted, %d received, %.2f%% packet loss, time %.0fms\n",

0 commit comments

Comments
 (0)