kuzzleio / sdk-go

Golang SDK using the WebSocket protocol to communicate with Kuzzle API including offline resiliency
http://docs.kuzzle.io/sdk/go/2
Apache License 2.0
8 stars 5 forks source link

A dependency API changed, the SDK doesn't build #259

Closed tsauvajon closed 3 years ago

tsauvajon commented 4 years ago

The API of github.com/satori/go.uuid changed: uuid.NewV4 used to return two values, now it only returns one.

Expected Behavior

Being able to use the Kuzzle Go SDK.

Current Behavior

$ go get
go: finding module for package github.com/gorilla/websocket
go: finding module for package github.com/satori/go.uuid
go: found github.com/satori/go.uuid in github.com/satori/go.uuid v1.2.0
go: found github.com/gorilla/websocket in github.com/gorilla/websocket v1.4.2
# github.com/kuzzleio/sdk-go/kuzzle
../../go/pkg/mod/github.com/kuzzleio/sdk-go@v0.0.0-20200427111537-33427e79f3ca/kuzzle/query.go:29:7: assignment mismatch: 2 variables but uuid.NewV4 returns 1 values

Possible Solution

Steps to Reproduce

Using Go Modules (but using GOPATH would yield the same result):

$ docker run -it --entrypoint bash golang

> mkdir /app
> cd /app
> go mod init app
> go get github.com/kuzzleio/sdk-go
> cat <<EOF>main.go
package main

import (
    "fmt"

    "github.com/kuzzleio/sdk-go/kuzzle"
    "github.com/kuzzleio/sdk-go/protocol/websocket"
)

func main() {
    conn := websocket.NewWebSocket("localhost", nil)
    k, _ := kuzzle.NewKuzzle(conn, nil)
    k.Connect()

    timestamp, err := k.Server.Now(nil)

    if err != nil {
        fmt.Println(err.Error())
        return
    }

    fmt.Println(timestamp)
}
EOF

> go get