multiple files

This commit is contained in:
Daniel Ponte 2025-02-22 15:40:09 -05:00
parent 9dc6019c17
commit 1b6e5af87f

View file

@ -12,10 +12,19 @@ import (
"strings" "strings"
) )
const filePath = "./pkg/database/models.go" var filePaths = []string{
"./pkg/database/models.go",
"./pkg/database/calls.sql.go",
}
func main() { func main() {
// Parse the source code // Parse the source code
for _, v := range filePaths {
process(v)
}
}
func process(filePath string) {
fset := token.NewFileSet() fset := token.NewFileSet()
f, err := parser.ParseFile(fset, filePath, nil, parser.ParseComments) f, err := parser.ParseFile(fset, filePath, nil, parser.ParseComments)
if err != nil { if err != nil {