In the case where the proto file is located in the root
function returns []string{""}
that leads to
cmd.Get: repository.Archive: utils.RunCmd: Command: git; Err: exit status 128; Stderr: fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
need nil
But in fact, it is enough to pass *.proto to git archive command.
Personally, I used it this way, and have not come across cases when some other files are needed
https://github.com/easyp-tech/easyp/blob/4ae83a4bde301cbaa53aac9c266a5a13a9760ef2/internal/mod/mod.go#L59
In the case where the proto file is located in the root function returns
[]string{""}
that leads to
cmd.Get: repository.Archive: utils.RunCmd: Command: git; Err: exit status 128; Stderr: fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
need
nil
But in fact, it is enough to pass
*.proto
togit archive
command. Personally, I used it this way, and have not come across cases when some other files are needed