Skip to content

Commit af3ea4b

Browse files
committed
wrapping comment, perf point of view
1 parent 76d2364 commit af3ea4b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/handler/handler.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ type Info struct {
6060
}
6161

6262
const (
63+
// Wrapping is best default because we can be in the situation where we
64+
// have received meaningful sentinel error which we need to wrap, even
65+
// automatically. If we'd have used %v (no wrapping) we would lose the
66+
// sentinel error info and we couldn't use annotation for this error.
67+
// However, we should think about this more later from performance point of
68+
// view.
6369
wrapError = ": %w"
6470
)
6571

0 commit comments

Comments
 (0)