Hi,
pkger fails if a project contains a folder named .go - I know probably not the best name, better don't ask about the details 😄
2020/03/04 13:57:55 read /work/go/patty/.go: is a directory: ParseDir failed /work/go/patty: /work/go/patty
The call to the go parser (in parser.go#L113) is called without a filter and the docs say:
ParseDir calls ParseFile for all files with names ending in ".go" in the directory specified by path and returns a map of package name -> package AST with all the packages found.
so a directory named .go is included and later passed to ParseFile (parser.go#L65) which returns the error.
Solution is simple though, just call ParseDirwith a filter to exclude directories.
Hi, pkger fails if a project contains a folder named
.go
- I know probably not the best name, better don't ask about the details 😄The call to the go parser (in parser.go#L113) is called without a filter and the docs say:
so a directory named
.go
is included and later passed toParseFile
(parser.go#L65) which returns the error. Solution is simple though, just callParseDir
with a filter to exclude directories.