Skip to content
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

Bug: Branch is broken, developers should control their code before sending. #146

Open
ElecTwix opened this issue Sep 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ElecTwix
Copy link
Contributor

Describe the bug

Bug: Branch is broken, developers should control their code before sending.
bor-encoding-and-http-connection-engine

db.go:1: : # github.com/surrealdb/surrealdb.go
./db.go:24:2: declared and not used: baseURL
./db.go:40:6: no new variables on left side of :=
./db.go:49:3: undefined: liveScheme
./db.go:56:19: undefined: connect (typecheck)
package surrealdb
internal/mock/mock.go:1: : # github.com/surrealdb/surrealdb.go/internal/mock
internal/mock/mock.go:12:9: cannot use w (variable of type *ws) as connection.Connection value in return statement: *ws does not implement connection.Connection (wrong type for method Connect)
		have Connect(string) (connection.Connection, error)
		want Connect() error (typecheck)
package mock
db_test.go:21:2: could not import github.com/surrealdb/surrealdb.go (-: # github.com/surrealdb/surrealdb.go
./db.go:24:2: declared and not used: baseURL
./db.go:40:6: no new variables on left side of :=
./db.go:49:3: undefined: liveScheme
./db.go:56:19: undefined: connect) (typecheck)
	"github.com/surrealdb/surrealdb.go"
	^
db_test.go:37:23: undefined: surrealdb (typecheck)
	db                  *surrealdb.DB
	                    ^
db_test.go:120:46: undefined: surrealdb (typecheck)
func (s *SurrealDBTestSuite) createTestDB() *surrealdb.DB {
                                             ^
db_test.go:131:86: undefined: surrealdb (typecheck)
func (s *SurrealDBTestSuite) openConnection(url string, impl connection.Connection) *surrealdb.DB {
                                                                              
       ^
db_test.go:635:74: not enough arguments in call to marshal.SmartUnmarshal[testUser]
	have (*invalid type)
	want (interface{}, error) (typecheck)
	_, err = marshal.SmartUnmarshal[testUser](s.db.Select("users:notexists"))
	                                                                       ^
db_test.go:653:5: not enough arguments in call to marshal.SmartUnmarshal[testUser]
	have (*invalid type)
	want (interface{}, error) (typecheck)
		}))
		 ^
db_test.go:663:5: not enough arguments in call to marshal.SmartUnmarshal[testUser]
	have (*invalid type)
	want (interface{}, error) (typecheck)
		}))
		 ^
internal/benchmark/benchmark_test.go:7:2: could not import github.com/surrealdb/surrealdb.go (-: # github.com/surrealdb/surrealdb.go
./db.go:24:2: declared and not used: baseURL
./db.go:40:6: no new variables on left side of :=
./db.go:49:3: undefined: liveScheme
./db.go:56:19: undefined: connect) (typecheck)
	"github.com/surrealdb/surrealdb.go"
	^
pkg/connection/connection.go:1: : # github.com/surrealdb/surrealdb.go/pkg/connection [github.com/surrealdb/surrealdb.go/pkg/connection.test]
pkg/connection/http_test.go:57:13: assignment mismatch: 2 variables but con.Connect returns 1 value
pkg/connection/http_test.go:57:25: too many arguments in call to con.Connect
	have (string)
	want ()
pkg/connection/ws_test.go:36:14: assignment mismatch: 2 variables but con.Connect returns 1 value
pkg/connection/ws_test.go:36:26: too many arguments in call to con.Connect
	have (string)
	want () (typecheck)
package connection
pkg/logger/slog_test.go:1: : # github.com/surrealdb/surrealdb.go/pkg/logger_test [github.com/surrealdb/surrealdb.go/pkg/logger.test]
pkg/logger/slog_test.go:39:12: undefined: New (typecheck)
package logger_test```

### Steps to reproduce

https://github.com/golangci/golangci-lint

### Expected behaviour

No lint errors.

### SurrealDB version

non-releated

### Contact Details

root@electwix.dev

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@ElecTwix ElecTwix added the bug Something isn't working label Sep 12, 2024
@remade
Copy link
Collaborator

remade commented Sep 13, 2024

Hi @ElecTwix . Was this breaking any existing flow? This should be resolved. A PR to the master branch will also be created shortly

@ElecTwix
Copy link
Contributor Author

Hi @remade, First, thank you for maintaining the Go SDK.

Was this breaking any existing flow?

No, it is not, but for the sake of the go SDK, we should check the linting error before committing to the official repo. If you want to work as a draft, we should do that by forking the official repo and doing it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants