Skip to content

Commit

Permalink
Fix name
Browse files Browse the repository at this point in the history
  • Loading branch information
auvn committed May 21, 2023
1 parent ae35d98 commit ac2b6d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ func newConnConfig(opts driverOptions) connConfig {
metric.WithUnit(unitMilliseconds),
metric.WithDescription(`The distribution of latencies of various calls in milliseconds`),
)
mustNoErr(err)
mustNoError(err)

callsCounter, err := meter.Int64Counter(dbSQLClientCalls,
metric.WithUnit(unitDimensionless),
metric.WithDescription(`The number of various calls of methods`),
)
mustNoErr(err)
mustNoError(err)

latencyRecorder := newMethodRecorder(latencyMsHistogram.Record, callsCounter.Add, opts.defaultAttributes...)

Expand Down
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ func handleErr(err error) {
}
}

func mustNoErr(err error) {
func mustNoError(err error) {
if err != nil {
panic(err)
}
Expand Down
4 changes: 2 additions & 2 deletions errors_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ func TestHandleError(t *testing.T) {
t.Parallel()

assert.Panics(t, func() {
mustNoErr(errors.New("error"))
mustNoError(errors.New("error"))
})

assert.NotPanics(t, func() {
mustNoErr(nil)
mustNoError(nil)
})

assert.NotPanics(t, func() {
Expand Down

0 comments on commit ac2b6d4

Please sign in to comment.