first commit

This commit is contained in:
2025-07-26 18:34:56 +05:30
commit d340db6dfd
29 changed files with 2284 additions and 0 deletions

37
cmd/main.go Normal file
View File

@@ -0,0 +1,37 @@
// Patial Tech.
// Author, Ankit Patial
package main
import (
"flag"
"fmt"
"os"
)
const usageTxt = `Please provide output director and input schema.
Example:
pgm/cmd -o ./db ./db/schema.sql
`
func main() {
var outDir string
flag.StringVar(&outDir, "o", "", "-o as output directory path")
flag.Parse()
if len(os.Args) < 4 {
fmt.Print(usageTxt)
return
}
if outDir == "" {
println("missing, -o output directory path")
os.Exit(1)
return
}
if err := generate(os.Args[3], outDir); err != nil {
println(err.Error())
os.Exit(1)
}
}