MCPcopy
hub / github.com/sqldef/sqldef / main

Function main

cmd/sqlite3def/sqlite3def.go:120–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118}
119
120func main() {
121 util.InitSlog()
122
123 config, options := parseOptions(os.Args[1:])
124
125 var db database.Database
126 if len(options.CurrentFile) > 0 {
127 db = file.NewDatabase(options.CurrentFile)
128 } else {
129 var err error
130 db, err = sqlite3.NewDatabase(config)
131 if err != nil {
132 log.Fatal(err)
133 }
134 defer db.Close()
135 }
136
137 sqlParser := database.NewParser(parser.ParserModeSQLite3)
138 sqldef.Run(schema.GeneratorModeSQLite3, db, sqlParser, options)
139}

Callers

nothing calls this directly

Calls 7

CloseMethod · 0.95
InitSlogFunction · 0.92
NewDatabaseFunction · 0.92
NewDatabaseFunction · 0.92
NewParserFunction · 0.92
parseOptionsFunction · 0.70
FatalMethod · 0.65

Tested by

no test coverage detected