(zilch lang go): fix go file parser with all: go:embed patterns
Technically this isn't quite right, as the full list of files is not available to the go parser (some files are filtered out too early in the process), but it should do the job for now.
This commit is contained in:
parent
a2bae93771
commit
b59fd781d0
1 changed files with 3 additions and 1 deletions
|
|
@ -258,6 +258,8 @@ func main() {
|
||||||
for _, pattern := range pkg.EmbedPatterns {
|
for _, pattern := range pkg.EmbedPatterns {
|
||||||
matchedFiles := []string{}
|
matchedFiles := []string{}
|
||||||
|
|
||||||
|
storePattern := pattern
|
||||||
|
|
||||||
// TODO: proper matching
|
// TODO: proper matching
|
||||||
if strings.HasPrefix(pattern, "all:") {
|
if strings.HasPrefix(pattern, "all:") {
|
||||||
pattern = pattern[4:]
|
pattern = pattern[4:]
|
||||||
|
|
@ -293,7 +295,7 @@ func main() {
|
||||||
split = append(split, []string{match[len(dir)+1:], dirname, filepath.Base(match)})
|
split = append(split, []string{match[len(dir)+1:], dirname, filepath.Base(match)})
|
||||||
}
|
}
|
||||||
|
|
||||||
out.Embeds[pattern] = split
|
out.Embeds[storePattern] = split
|
||||||
}
|
}
|
||||||
|
|
||||||
outfiles[dir] = out
|
outfiles[dir] = out
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue