Skip to content

Commit

Permalink
rename sql_formatter_go to gopsqlfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Toru-Takagi committed Jul 5, 2023
1 parent 80a1807 commit 11007e7
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 17 deletions.
6 changes: 3 additions & 3 deletions README.md
@@ -1,13 +1,13 @@
# sql_formatter_go
# gopsqlfmt

Format SQL strings in go files.

# install command

`go install github.com/Toru-Takagi/sql_formatter_go@latest`
`go install github.com/Toru-Takagi/gopsqlfmt@latest`


# exec

1. `$ cd [your go project root]`
2. `$ sql_formatter_go ./...`
2. `$ gopsqlfmt ./...`
2 changes: 1 addition & 1 deletion analyzer/format_sql_analyzer.go
Expand Up @@ -9,7 +9,7 @@ import (
"io/ioutil"
"strings"

"github.com/Toru-Takagi/sql_formatter_go/formatter"
"github.com/Toru-Takagi/gopsqlfmt/formatter"
"golang.org/x/tools/go/analysis"
)

Expand Down
2 changes: 1 addition & 1 deletion formatter/enumconv/convert_test.go
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"testing"

"github.com/Toru-Takagi/sql_formatter_go/formatter/enumconv"
"github.com/Toru-Takagi/gopsqlfmt/formatter/enumconv"
pg_query "github.com/pganalyze/pg_query_go/v4"
"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions formatter/format.go
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"strings"

"github.com/Toru-Takagi/sql_formatter_go/fmtconf"
nodeformatter "github.com/Toru-Takagi/sql_formatter_go/formatter/node_formatter"
"github.com/Toru-Takagi/gopsqlfmt/fmtconf"
nodeformatter "github.com/Toru-Takagi/gopsqlfmt/formatter/node_formatter"

pg_query "github.com/pganalyze/pg_query_go/v4"
)
Expand Down
4 changes: 2 additions & 2 deletions formatter/format_test.go
@@ -1,8 +1,8 @@
package formatter_test

import (
"github.com/Toru-Takagi/sql_formatter_go/fmtconf"
"github.com/Toru-Takagi/sql_formatter_go/formatter"
"github.com/Toru-Takagi/gopsqlfmt/fmtconf"
"github.com/Toru-Takagi/gopsqlfmt/formatter"

"testing"

Expand Down
2 changes: 1 addition & 1 deletion formatter/node_formatter/format_aexpr.go
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/Toru-Takagi/sql_formatter_go/fmtconf"
"github.com/Toru-Takagi/gopsqlfmt/fmtconf"
pg_query "github.com/pganalyze/pg_query_go/v4"
)

Expand Down
2 changes: 1 addition & 1 deletion formatter/node_formatter/format_funccall.go
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/Toru-Takagi/sql_formatter_go/fmtconf"
"github.com/Toru-Takagi/gopsqlfmt/fmtconf"
pg_query "github.com/pganalyze/pg_query_go/v4"
)

Expand Down
6 changes: 3 additions & 3 deletions formatter/where_clause_format.go
@@ -1,9 +1,9 @@
package formatter

import (
"github.com/Toru-Takagi/sql_formatter_go/fmtconf"
"github.com/Toru-Takagi/sql_formatter_go/formatter/enumconv"
nodeformatter "github.com/Toru-Takagi/sql_formatter_go/formatter/node_formatter"
"github.com/Toru-Takagi/gopsqlfmt/fmtconf"
"github.com/Toru-Takagi/gopsqlfmt/formatter/enumconv"
nodeformatter "github.com/Toru-Takagi/gopsqlfmt/formatter/node_formatter"

"context"
"errors"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
@@ -1,11 +1,12 @@
module github.com/Toru-Takagi/sql_formatter_go
module github.com/Toru-Takagi/gopsqlfmt

go 1.20

require (
github.com/google/go-cmp v0.5.1
github.com/pganalyze/pg_query_go/v4 v4.2.1
github.com/stretchr/testify v1.8.4
golang.org/x/tools v0.10.0
)

require (
Expand All @@ -14,7 +15,6 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/tools v0.10.0 // indirect
google.golang.org/protobuf v1.23.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
1 change: 1 addition & 0 deletions go.sum
Expand Up @@ -20,6 +20,7 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU=
golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg=
Expand Down
2 changes: 1 addition & 1 deletion main.go
@@ -1,7 +1,7 @@
package main

import (
"github.com/Toru-Takagi/sql_formatter_go/analyzer"
"github.com/Toru-Takagi/gopsqlfmt/analyzer"
"golang.org/x/tools/go/analysis/singlechecker"
)

Expand Down

0 comments on commit 11007e7

Please sign in to comment.