mirror of
https://github.com/opbnq-q/nto-cli.git
synced 2025-12-06 21:40:35 +07:00
23 lines
383 B
Go
23 lines
383 B
Go
package main
|
|
|
|
import (
|
|
"nto_cli/cmd"
|
|
"nto_cli/generation"
|
|
"nto_cli/utils"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
structNames, path := cmd.SelectionInput()
|
|
|
|
for _, structName := range structNames {
|
|
file, err := os.Open(path)
|
|
defer file.Close()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
structFields := utils.GetStructFields(file, structName)
|
|
generation.Generate(structName, structFields)
|
|
}
|
|
}
|