rename core to boilingcore to make a more sense

* make more sense as a third party library
This commit is contained in:
Patrick O'brien 2017-01-14 13:38:40 +10:00
parent 88cde8df0c
commit 788d28400e
12 changed files with 18 additions and 18 deletions

View file

@ -1,6 +1,6 @@
// Package sqlboiler has types and methods useful for generating code that // Package sqlboiler has types and methods useful for generating code that
// acts as a fully dynamic ORM might. // acts as a fully dynamic ORM might.
package core package boilingcore
import ( import (
"encoding/json" "encoding/json"

View file

@ -1,4 +1,4 @@
package core package boilingcore
import ( import (
"bufio" "bufio"

View file

@ -1,4 +1,4 @@
package core package boilingcore
// Config for the running of the commands // Config for the running of the commands
type Config struct { type Config struct {

View file

@ -1,4 +1,4 @@
package core package boilingcore
import ( import (
"bytes" "bytes"

View file

@ -1,4 +1,4 @@
package core package boilingcore
import ( import (
"reflect" "reflect"

View file

@ -1,4 +1,4 @@
package core package boilingcore
import ( import (
"bufio" "bufio"

View file

@ -1,4 +1,4 @@
package core package boilingcore
import ( import (
"bytes" "bytes"

View file

@ -1,4 +1,4 @@
package core package boilingcore
import ( import (
"fmt" "fmt"

View file

@ -1,4 +1,4 @@
package core package boilingcore
import ( import (
"sort" "sort"

View file

@ -1,4 +1,4 @@
package core package boilingcore
import ( import (
"fmt" "fmt"

View file

@ -1,4 +1,4 @@
package core package boilingcore
import ( import (
"reflect" "reflect"

14
main.go
View file

@ -11,14 +11,14 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
"github.com/vattle/sqlboiler/bdb/drivers" "github.com/vattle/sqlboiler/bdb/drivers"
"github.com/vattle/sqlboiler/core" "github.com/vattle/sqlboiler/boilingcore"
) )
const sqlBoilerVersion = "2.1.5" const sqlBoilerVersion = "2.1.5"
var ( var (
cmdState *core.State cmdState *boilingcore.State
cmdConfig *core.Config cmdConfig *boilingcore.Config
) )
func main() { func main() {
@ -123,7 +123,7 @@ func preRun(cmd *cobra.Command, args []string) error {
driverName := args[0] driverName := args[0]
cmdConfig = &core.Config{ cmdConfig = &boilingcore.Config{
DriverName: driverName, DriverName: driverName,
OutFolder: viper.GetString("output"), OutFolder: viper.GetString("output"),
Schema: viper.GetString("schema"), Schema: viper.GetString("schema"),
@ -164,7 +164,7 @@ func preRun(cmd *cobra.Command, args []string) error {
} }
if driverName == "postgres" { if driverName == "postgres" {
cmdConfig.Postgres = core.PostgresConfig{ cmdConfig.Postgres = boilingcore.PostgresConfig{
User: viper.GetString("postgres.user"), User: viper.GetString("postgres.user"),
Pass: viper.GetString("postgres.pass"), Pass: viper.GetString("postgres.pass"),
Host: viper.GetString("postgres.host"), Host: viper.GetString("postgres.host"),
@ -200,7 +200,7 @@ func preRun(cmd *cobra.Command, args []string) error {
} }
if driverName == "mysql" { if driverName == "mysql" {
cmdConfig.MySQL = core.MySQLConfig{ cmdConfig.MySQL = boilingcore.MySQLConfig{
User: viper.GetString("mysql.user"), User: viper.GetString("mysql.user"),
Pass: viper.GetString("mysql.pass"), Pass: viper.GetString("mysql.pass"),
Host: viper.GetString("mysql.host"), Host: viper.GetString("mysql.host"),
@ -241,7 +241,7 @@ func preRun(cmd *cobra.Command, args []string) error {
} }
} }
cmdState, err = core.New(cmdConfig) cmdState, err = boilingcore.New(cmdConfig)
return err return err
} }