-
Notifications
You must be signed in to change notification settings - Fork 318
/
Copy pathmain.go
37 lines (30 loc) · 855 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Command xo generates code from database schemas and custom queries. Works
// with PostgreSQL, MySQL, Microsoft SQL Server, Oracle Database, and SQLite3.
package main
//go:generate ./gen.sh models
import (
"context"
"fmt"
"os"
// drivers
_ "github.com/denisenkom/go-mssqldb"
_ "github.com/go-sql-driver/mysql"
_ "github.com/lib/pq"
_ "github.com/mattn/go-sqlite3"
_ "github.com/sijms/go-ora"
// templates
_ "github.com/xo/xo/templates/createdbtpl"
_ "github.com/xo/xo/templates/dottpl"
_ "github.com/xo/xo/templates/gotpl"
_ "github.com/xo/xo/templates/jsontpl"
_ "github.com/xo/xo/templates/yamltpl"
"github.com/xo/xo/cmd"
)
// version is the app version.
var version = "0.0.0-dev"
func main() {
if err := cmd.Run(context.Background(), "xo", version); err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1)
}
}