Skip to content

Commit

Permalink
Merge pull request #20 from RyougiNevermore/master
Browse files Browse the repository at this point in the history
update cmd mod
  • Loading branch information
RyougiNevermore committed Aug 5, 2020
2 parents 4286eff + 83990e5 commit b7967fb
Show file tree
Hide file tree
Showing 31 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ tx.Commit()
```
## Code Generates
### Install dalc
`go get -u github.com/pharosnet/dalc/cmd/dalc/v2`
`go get -u github.com/pharosnet/dalc/v2/cmd/dalc`
### Write sql schema files
Write sql schema files in some folder, such as schema/, and foo.sql in this folder.
```sql
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/pharosnet/dalc/v2/cmd/dalc/v2
module github.com/pharosnet/dalc/v2/cmd/dalc

go 1.14

Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/entry/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/commons"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/commons"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/generates/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package generates

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/logs"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/logs"
"go/format"
"io/ioutil"
"os"
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/generates/generate.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package generates

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"path/filepath"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/dalc/internal/generates/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package generates
import (
"bytes"
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/commons"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/commons"
"strings"
"text/template"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/dalc/internal/generates/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package generates
import (
"bytes"
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/commons"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/commons"
"strings"
"text/template"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/generates/template.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package generates

import "github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
import "github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"

type TemplateData struct {
Package string
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/commons/strings_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package commons_test

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/commons"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/commons"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/commons/words_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package commons_test

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/commons"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/commons"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/change.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package mysql

import "github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
import "github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"

const (
TableDropChangeKind = "DROP TABLE"
Expand Down
4 changes: 2 additions & 2 deletions cmd/dalc/internal/parser/mysql/parse_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package mysql

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/commons"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/commons"
"github.com/vitessio/vitess/go/vt/sqlparser"
"reflect"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mysql

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/vitessio/vitess/go/vt/sqlparser"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_delete_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mysql_test

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/mysql"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/mysql"
"io/ioutil"
"os"
"path/filepath"
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_exprs.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mysql

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/vitessio/vitess/go/vt/sqlparser"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mysql

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/vitessio/vitess/go/vt/sqlparser"
"reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_insert_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mysql_test

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/mysql"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/mysql"
"io/ioutil"
"os"
"path/filepath"
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mysql

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/vitessio/vitess/go/vt/sqlparser"
"reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_select_limit.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mysql

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/vitessio/vitess/go/vt/sqlparser"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mysql

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/vitessio/vitess/go/vt/sqlparser"
"reflect"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mysql

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/vitessio/vitess/go/vt/sqlparser"
"reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_select_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mysql_test

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/mysql"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/mysql"
"io/ioutil"
"os"
"path/filepath"
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_select_where.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mysql
import (
"bytes"
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/vitessio/vitess/go/vt/sqlparser"
"reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mysql_test

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/mysql"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/mysql"
"io/ioutil"
"os"
"path/filepath"
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mysql

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/vitessio/vitess/go/vt/sqlparser"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_query_update_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mysql_test

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/mysql"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/mysql"
"io/ioutil"
"os"
"path/filepath"
Expand Down
4 changes: 2 additions & 2 deletions cmd/dalc/internal/parser/mysql/parse_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package mysql

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/commons"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/commons"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/mysql/parse_schema_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mysql_test

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/mysql"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/mysql"
"io/ioutil"
"os"
"path/filepath"
Expand Down
8 changes: 4 additions & 4 deletions cmd/dalc/internal/parser/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package parser

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/files"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/logs"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser/mysql"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/entry"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/files"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/logs"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser/mysql"
)

func Parse(dialect string, schemaPath string, queryPath string) (tables []*entry.Table, queries []*entry.Query, err error) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/dalc/internal/parser/parse_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package parser_test

import (
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser"
"os"
"path/filepath"
"testing"
Expand Down
6 changes: 3 additions & 3 deletions cmd/dalc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package main

import (
"fmt"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/generates"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/logs"
"github.com/pharosnet/dalc/v2/cmd/dalc/v2/internal/parser"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/generates"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/logs"
"github.com/pharosnet/dalc/v2/cmd/dalc/internal/parser"
"github.com/urfave/cli/v2"
"os"
"path"
Expand Down

0 comments on commit b7967fb

Please sign in to comment.