We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75c69c6 commit 4e2ba30Copy full SHA for 4e2ba30
1 file changed
docs/checks/impl.go
@@ -30,9 +30,9 @@ var errCheckNotExist = errors.New("check does not exist")
30
const docURL = "https://github.com/ossf/scorecard/blob/%s/docs/checks.md"
31
32
var (
33
- cachedDoc Doc
34
- cachedErr error
35
- readOnce sync.Once
+ readOnce sync.Once
+ errCachedRead error
+ cachedDoc Doc
36
)
37
38
// DocImpl implements `Doc` interface and
@@ -50,12 +50,12 @@ func Read() (Doc, error) {
50
m, e := internal.ReadDoc()
51
if e != nil {
52
cachedDoc = &DocImpl{}
53
- cachedErr = fmt.Errorf("internal.ReadDoc: %w", e)
+ errCachedRead = fmt.Errorf("internal.ReadDoc: %w", e)
54
return
55
}
56
cachedDoc = &DocImpl{internaldoc: m}
57
})
58
- return cachedDoc, cachedErr
+ return cachedDoc, errCachedRead
59
60
61
// GetCheck returns the information for check `name`.
0 commit comments