Exemple #1
0
package main

import (
	"github.com/mabetle/mdb"
	"github.com/mabetle/mdb/demo/ioc"
)

var (
	db = ioc.GetSql()
)

func main() {
	mdb.NewLinkSql(db).SetTable("demo_table").Print()
}
Exemple #2
0
package main

import (
	"github.com/mabetle/mdb/demo"
	"github.com/mabetle/mdb/demo/ioc"
)

var (
	sql = ioc.GetSql()
)

func InitDB() {
	demo.InitDB(sql)
}

func main() {
	InitDB()
}