3
0

Ported options codegen to cue

This commit is contained in:
Denis Arh
2022-01-29 12:13:04 +01:00
parent cb34bad61a
commit a035e6106f
100 changed files with 2471 additions and 2518 deletions
-18
View File
@@ -61,10 +61,6 @@ func Proc() {
storeSrc []string
storeDefs []*storeDef
optionSrcPath = filepath.Join("pkg", "options", "*.yaml")
optionSrc []string
optionDefs []*optionsDef
aFuncsSrcPath = filepath.Join("*", "automation", "*_handler.yaml")
aFuncsSrc []string
aFuncsDefs []*aFuncDefs
@@ -163,9 +159,6 @@ func Proc() {
storeSrc = glob(storeSrcPath)
output("loaded %d store definitions from %s\n", len(storeSrc), storeSrcPath)
optionSrc = glob(optionSrcPath)
output("loaded %d option definitions from %s\n", len(optionSrc), optionSrcPath)
aFuncsSrc = glob(aFuncsSrcPath)
output("loaded %d function definitions from %s\n", len(aFuncsSrc), aFuncsSrcPath)
@@ -184,7 +177,6 @@ func Proc() {
fileList = append(fileList, exprTypeSrc...)
fileList = append(fileList, restSrc...)
fileList = append(fileList, storeSrc...)
fileList = append(fileList, optionSrc...)
fileList = append(fileList, aFuncsSrc...)
for _, d := range fileList {
@@ -265,16 +257,6 @@ func Proc() {
return
}
if optionDefs, err = procOptions(optionSrc...); err == nil {
if genCode {
err = genOptions(tpls, optionDefs...)
}
if genDocs && err == nil {
err = genOptionsDocs(tpls, docPath+docGenBase, optionDefs...)
}
}
if outputErr(err, "fail to process options:\n") {
return
}