blob: e482578c47760e262d6b3741da67bd8a152c6895 [file] [log] [blame]
Tim Windelschmidt1f4590b2025-07-29 23:05:36 +02001// Copyright 2021 The Cockroach Authors.
2// SPDX-License-Identifier: Apache-2.0
3
4package errwrap
5
6// ErrorFnFormatStringIndex contains functions that should be checked for
7// improperly wrapped errors. The value is the index of the function
8// parameter containing the format string. It is -1 if there is no format
9// string parameter.
10var ErrorFnFormatStringIndex = map[string]int{
11 "errors.New": -1,
12
13 "github.com/pkg/errors.New": -1,
14 "github.com/pkg/errors.Wrap": -1,
15
16 "fmt.Errorf": 0,
17
18 "github.com/pkg/errors.Errorf": 0,
19 "github.com/pkg/errors.Wrapf": 1,
20}