fix data race

This commit is contained in:
FogDong
2021-11-03 11:04:26 +08:00
parent a252749f77
commit 0b55ce8386
+2 -3
View File
@@ -27,8 +27,7 @@ import (
var (
//go:embed pkgs op.cue
fs embed.FS
pkgContent string
fs embed.FS
)
// GetPackages Get Stdlib packages
@@ -44,7 +43,7 @@ func GetPackages(tagTempl string) (map[string]string, error) {
return nil, err
}
pkgContent = string(opBytes) + "\n"
pkgContent := string(opBytes) + "\n"
for _, file := range files {
body, err := fs.ReadFile("pkgs/" + file.Name())
if err != nil {