Skip to content

Commit f998af1

Browse files
authored
Merge pull request #4641 from kersten/fix/shadowed-path-variable
🌱 fix: resolve shadowed variable issue in literate.go
2 parents 214257c + 899b110 commit f998af1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/book/utils/litgo/literate.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ func (l Literate) Process(input *plugin.Input) error {
5757
chapterDir: chapterDir,
5858
bookSrcDir: bookSrcDir,
5959
}
60-
path := pathInfo.FullPath()
60+
fullPath := pathInfo.FullPath()
6161

6262
// TODO(directxman12): don't escape root?
63-
contents, err := os.ReadFile(path)
63+
contents, err := os.ReadFile(fullPath)
6464
if err != nil {
65-
return "", fmt.Errorf("unable to import %q: %v", path, err)
65+
return "", fmt.Errorf("unable to import %q: %v", fullPath, err)
6666
}
6767

6868
return l.extractContents(contents, pathInfo)

0 commit comments

Comments
 (0)