Introduce API module.

This commit is contained in:
Jeffrey Regan
2019-10-21 13:22:04 -07:00
parent 644f2ddcdc
commit 5416ae7365
47 changed files with 2042 additions and 272 deletions

View File

@@ -26,6 +26,8 @@ const (
Generator
)
const packageForGeneratedCode = "builtins"
func main() {
root := inputFileRoot()
file, err := os.Open(root + ".go")
@@ -48,8 +50,7 @@ func main() {
fmt.Sprintf(
"// pluginator %+v\n", provenance.GetProvenance()))
w.write("\n")
// TODO: `builtins` should be a const?
w.write("package builtins")
w.write("package " + packageForGeneratedCode)
pType := unknown
@@ -125,7 +126,7 @@ func makeOutputFileName(root string) string {
"src",
pgmconfig.DomainName,
pgmconfig.ProgramName,
"api", "plugins", "builtins",
"api", "plugins", packageForGeneratedCode,
root+".go")
}