8000 replace package name by mattn · Pull Request #116 · sqls-server/sqls · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

replace package name #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ changelog:
- '^test:'
release:
github:
owner: lighttiger2505
owner: sqls-server
name: sqls
# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ stringer:
.PHONY: snapshot
snapshot: $(SRCS)
docker run --rm --privileged \
-v ${PWD}:/go/src/github.com/lighttiger2505/sqls \
-v ${PWD}:/go/src/github.com/sqls-server/sqls \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/lighttiger2505/sqls \
-w /go/src/github.com/sqls-server/sqls \
mailchain/goreleaser-xcgo --snapshot --rm-dist

.PHONY: publish
publish: $(SRCS)
docker run --rm --privileged \
-e GITHUB_TOKEN=$(GITHUB_TOKEN) \
-v ${PWD}:/go/src/github.com/lighttiger2505/sqls \
-v ${PWD}:/go/src/github.com/sqls-server/sqls \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/lighttiger2505/sqls \
-w /go/src/github.com/sqls-server/sqls \
mailchain/goreleaser-xcgo --rm-dist
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sqls

![test](https://github.com/lighttiger2505/sqls/workflows/test/badge.svg)
![test](https://github.com/sqls-server/sqls/workflows/test/badge.svg)

An implementation of the Language Server Protocol for SQL.

Expand Down Expand Up @@ -42,7 +42,7 @@ If the tables are connected with a foreign key sqls can complete ```JOIN``` stat

#### CodeAction

![code_actions](https://github.com/lighttiger2505/sqls.vim/blob/master/imgs/sqls_vim_demo.gif)
![code_actions](https://github.com/sqls-server/sqls.vim/blob/master/imgs/sqls_vim_demo.gif)

- [x] Execute SQL
- [ ] Explain SQL
Expand All @@ -64,12 +64,12 @@ If the tables are connected with a foreign key sqls can complete ```JOIN``` stat
## Installation

```shell
go install github.com/lighttiger2505/sqls@latest
go install github.com/sqls-server/sqls@latest
```

## Editor Plugins

- [sqls.vim](https://github.com/lighttiger2505/sqls.vim)
- [sqls.vim](https://github.com/sqls-server/sqls.vim)
- [vscode-sqls](https://github.com/lighttiger2505/vscode-sqls)
- [sqls.nvim](https://github.com/nanotee/sqls.nvim)
- [Emacs LSP mode](https://emacs-lsp.github.io/lsp-mode/page/lsp-sqls/)
Expand Down Expand Up @@ -122,7 +122,7 @@ connections:
port: 22
user: sshuser
passPhrase: ssspass
privateKey: /home/lighttiger2505/.ssh/id_rsa
privateKey: /home/sqls-server/.ssh/id_rsa
```

### Workspace configuration Sample
Expand Down Expand Up @@ -262,8 +262,8 @@ See also.
## Contributors

This project exists thanks to all the people who contribute.
<a href="https://github.com/lighttiger2505/sqls/graphs/contributors">
<img src="https://contrib.rocks/image?repo=lighttiger2505/sqls" />
<a href="https://github.com/sqls-server/sqls/graphs/contributors">
<img src="https://contrib.rocks/image?repo=sqls-server/sqls" />
</a>

## Inspired
Expand Down
4 changes: 2 additions & 2 deletions ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package ast
import (
"strings"

"github.com/lighttiger2505/sqls/dialect"
"github.com/lighttiger2505/sqls/token"
"github.com/sqls-server/sqls/dialect"
"github.com/sqls-server/sqls/token"
)

type NodeType int
Expand Down
6 changes: 3 additions & 3 deletions ast/astutil/astutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"strings"

"github.com/lighttiger2505/sqls/ast"
"github.com/lighttiger2505/sqls/dialect"
"github.com/lighttiger2505/sqls/token"
"github.com/sqls-server/sqls/ast"
"github.com/sqls-server/sqls/dialect"
"github.com/sqls-server/sqls/token"
)

type NodeMatcher struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/lighttiger2505/sqls
module github.com/sqls-server/sqls

go 1.16

Expand Down
6 changes: 3 additions & 3 deletions internal/completer/candidates.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"strings"

"github.com/lighttiger2505/sqls/internal/database"
"github.com/lighttiger2505/sqls/internal/lsp"
"github.com/lighttiger2505/sqls/parser/parseutil"
"github.com/sqls-server/sqls/internal/database"
"github.com/sqls-server/sqls/internal/lsp"
"github.com/sqls-server/sqls/parser/parseutil"
)

func (c *Completer) keywordCandidates(lower bool, keywords []string) []lsp.CompletionItem {
Expand Down
16 changes: 8 additions & 8 deletions internal/completer/completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"regexp"
"strings"

"github.com/lighttiger2505/sqls/ast"
"github.com/lighttiger2505/sqls/ast/astutil"
"github.com/lighttiger2505/sqls/dialect"
"github.com/lighttiger2505/sqls/internal/database"
"github.com/lighttiger2505/sqls/internal/lsp"
"github.com/lighttiger2505/sqls/parser"
"github.com/lighttiger2505/sqls/parser/parseutil"
"github.com/lighttiger2505/sqls/token"
"github.com/sqls-server/sqls/ast"
"github.com/sqls-server/sqls/ast/astutil"
"github.com/sqls-server/sqls/dialect"
"github.com/sqls-server/sqls/internal/database"
"github.com/sqls-server/sqls/internal/lsp"
"github.com/sqls-server/sqls/parser"
"github.com/sqls-server/sqls/parser/parseutil"
"github.com/sqls-server/sqls/token"
)

type completionType int
Expand Down
2 changes: 1 addition & 1 deletion internal/completer/completer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/lighttiger2505/sqls/internal/lsp"
"github.com/sqls-server/sqls/internal/lsp"
)

func TestGetBeforeCursorText(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"path/filepath"

"github.com/lighttiger2505/sqls/internal/database"
"github.com/sqls-server/sqls/internal/database"
"gopkg.in/yaml.v2"
)

Expand Down
6 changes: 3 additions & 3 deletions internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/lighttiger2505/sqls/internal/database"
"github.com/sqls-server/sqls/internal/database"
)

func TestGetConfig(t *testing.T) {
Expand Down Expand Up @@ -42,7 +42,7 @@ func TestGetConfig(t *testing.T) {
{
Alias: "sqls_sqlite3",
Driver: "sqlite3",
DataSourceName: "file:/home/lighttiger2505/chinook.db",
DataSourceName: "file:/home/sqls-server/chinook.db",
},
{
Alias: "sqls_postgresql",
Expand All @@ -69,7 +69,7 @@ func TestGetConfig(t *testing.T) {
Port: 22,
User: "vagrant",
PassPhrase: "passphrase1234",
PrivateKey: "/home/lighttiger2505/.ssh/id_rsa",
PrivateKey: "/home/sqls-server/.ssh/id_rsa",
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions internal/config/testdata/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ connections:
tls: skip-verify
- alias: sqls_sqlite3
driver: sqlite3
dataSourceName: "file:/home/lighttiger2505/chinook.db"
dataSourceName: "file:/home/sqls-server/chinook.db"
- alias: sqls_postgresql
driver: postgresql
dataSourceName: ""
Expand All @@ -42,4 +42,4 @@ connections:
port: 22
user: vagrant
passPhrase: passphrase1234
privateKey: /home/lighttiger2505/.ssh/id_rsa
privateKey: /home/sqls-server/.ssh/id_rsa
2 changes: 1 addition & 1 deletion internal/config/testdata/no_ssh_host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ connections:
port: 22
user: vagrant
passPhrase: passphrase1234
privateKey: /home/lighttiger2505/.ssh/id_rsa
privateKey: /home/sqls-server/.ssh/id_rsa
2 changes: 1 addition & 1 deletion internal/config/testdata/no_ssh_user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ connections:
port: 22
user: ""
passPhrase: passphrase1234
privateKey: /home/lighttiger2505/.ssh/id_rsa
privateKey: /home/sqls-server/.ssh/id_rsa
2 changes: 1 addition & 1 deletion internal/database/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"io/ioutil"

"github.com/lighttiger2505/sqls/dialect"
"github.com/sqls-server/sqls/dialect"
"golang.org/x/crypto/ssh"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"fmt"
"strings"

"github.com/lighttiger2505/sqls/dialect"
"github.com/lighttiger2505/sqls/parser/parseutil"
"github.com/sqls-server/sqls/dialect"
"github.com/sqls-server/sqls/parser/parseutil"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/database/database_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"database/sql"

"github.com/lighttiger2505/sqls/dialect"
"github.com/sqls-server/sqls/dialect"
)

type MockDBRepository struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/database/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"database/sql"
"fmt"

"github.com/lighttiger2505/sqls/dialect"
"github.com/sqls-server/sqls/dialect"
"golang.org/x/crypto/ssh"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/database/mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"

_ "github.com/denisenkom/go-mssqldb"
"github.com/lighttiger2505/sqls/dialect"
"github.com/sqls-server/sqls/dialect"
"golang.org/x/crypto/ssh"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/database/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"

"github.com/go-sql-driver/mysql"
"github.com/lighttiger2505/sqls/dialect"
"github.com/sqls-server/sqls/dialect"
"golang.org/x/crypto/ssh"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/database/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"

_ "github.com/godror/godror"
"github.com/lighttiger2505/sqls/dialect"
"github.com/sqls-server/sqls/dialect"
)

func init() {
Expand Down
5 changes: 3 additions & 2 deletions internal/database/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/stdlib"
"github.com/lighttiger2505/sqls/dialect"
"github.com/sqls-server/sqls/dialect"
"golang.org/x/crypto/ssh"
)

Expand Down Expand Up @@ -430,7 +430,8 @@ func genPostgresConfig(connCfg *DBConfig) (string, error) {
// ignoring any values with keys in ignore.
//
// For example, to build a "ODBC" style connection string, use like the following:
// genOptions(u.Query(), "", "=", ";", ",")
//
// genOptions(u.Query(), "", "=", ";", ",")
func genOptions(q url.Values, joiner, assign, sep, valSep string, skipWhenEmpty bool, ignore ...string) string {
qlen := len(q)
if qlen == 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/database/sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"log"

"github.com/lighttiger2505/sqls/dialect"
_ "github.com/mattn/go-sqlite3"
"github.com/sqls-server/sqls/dialect"
)

func init() {
Expand Down
12 changes: 6 additions & 6 deletions internal/formatter/formatter.go
341A
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package formatter
import (
"errors"

"github.com/lighttiger2505/sqls/ast"
"github.com/lighttiger2505/sqls/ast/astutil"
"github.com/lighttiger2505/sqls/internal/config"
"github.com/lighttiger2505/sqls/internal/lsp"
"github.com/lighttiger2505/sqls/parser"
"github.com/lighttiger2505/sqls/token"
"github.com/sqls-server/sqls/ast"
"github.com/sqls-server/sqls/ast/astutil"
"github.com/sqls-server/sqls/internal/config"
"github.com/sqls-server/sqls/internal/lsp"
"github.com/sqls-server/sqls/parser"
"github.com/sqls-server/sqls/token"
)

func Format(text string, params lsp.DocumentFormattingParams, cfg *config.Config) ([]lsp.TextEdit, error) {
Expand Down
8 changes: 4 additions & 4 deletions internal/formatter/formatter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package formatter
import (
"testing"

"github.com/lighttiger2505/sqls/ast"
"github.com/lighttiger2505/sqls/internal/config"
"github.com/lighttiger2505/sqls/internal/lsp"
"github.com/lighttiger2505/sqls/parser"
"github.com/sqls-server/sqls/ast"
"github.com/sqls-server/sqls/internal/config"
"github.com/sqls-server/sqls/internal/lsp"
"github.com/sqls-server/sqls/parser"
)

func TestEval(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/formatter/formatutil.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package formatter

import (
"github.com/lighttiger2505/sqls/ast"
"github.com/lighttiger2505/sqls/token"
"github.com/sqls-server/sqls/ast"
"github.com/sqls-server/sqls/token"
)

func unshift(slice []ast.Node, node ...ast.Node) []ast.Node {
Expand Down
4 changes: 2 additions & 2 deletions internal/handler/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"encoding/json"
"fmt"

"github.com/lighttiger2505/sqls/internal/completer"
"github.com/lighttiger2505/sqls/internal/lsp"
"github.com/sourcegraph/jsonrpc2"
"github.com/sqls-server/sqls/internal/completer"
"github.com/sqls-server/sqls/internal/lsp"
)

func (s *Server) handleTextDocumentCompletion(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request) (result interface{}, err error) {
Expand Down
6 changes: 3 additions & 3 deletions internal/handler/completion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package handler
import (
"testing"

"github.com/lighttiger2505/sqls/internal/config"
"github.com/lighttiger2505/sqls/internal/database"
"github.com/lighttiger2505/sqls/internal/lsp"
"github.com/sqls-server/sqls/internal/config"
"github.com/sqls-server/sqls/internal/database"
"github.com/sqls-server/sqls/internal/lsp"
)

type completionTestCase struct {
Expand Down
Loading
0