multiple files
This commit is contained in:
parent
9dc6019c17
commit
1b6e5af87f
1 changed files with 10 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue