File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ func (p *GoParser) collectGoMods(startDir string) error {
102102
103103 name , err := getModuleName (path )
104104 if err != nil {
105- return fmt .Errorf ("failed to get module name: %s " , err . Error () )
105+ return fmt .Errorf ("failed to get module name: %w " , err )
106106 }
107107
108108 rel , err := filepath .Rel (p .homePageDir , filepath .Dir (path ))
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ func hasNoDeps(modFilePath string) bool {
167167func getModuleName (modFilePath string ) (string , error ) {
168168 content , err := os .ReadFile (modFilePath )
169169 if err != nil {
170- return "" , fmt .Errorf ("failed to read file: %s " , err . Error () )
170+ return "" , fmt .Errorf ("failed to read file: %w " , err )
171171 }
172172
173173 return modfile .ModulePath (content ), nil
You can’t perform that action at this time.
0 commit comments