diff --git a/.github/workflows/kuksa_go_client.yaml b/.github/workflows/kuksa_go_client.yaml index 3bdd4b0..d0a4696 100644 --- a/.github/workflows/kuksa_go_client.yaml +++ b/.github/workflows/kuksa_go_client.yaml @@ -46,8 +46,9 @@ jobs: go run protocInstall/protocInstall.go export PATH=$PATH:$HOME/protoc/bin sudo chmod +x $HOME/protoc/bin/protoc - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + # As we in protocInstall.go download a specific version of protoc we cannot use latest of the packages below + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 export PATH=$PATH:$HOME/go/bin go generate . go test . diff --git a/kuksa_go_client/README.md b/kuksa_go_client/README.md index e6c6b2e..d04f5fe 100644 --- a/kuksa_go_client/README.md +++ b/kuksa_go_client/README.md @@ -28,10 +28,19 @@ if you use `apt`you must manually create a folder called `proto` ``` - Run the following command to install the needed GO protocol buffers plugins: + ``` > go install google.golang.org/protobuf/cmd/protoc-gen-go@latest > go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest ``` + +Your `protoc` may not be compatible with the latest version. +If so you may need to specify specific versions, the examples below works for `3.19`. +``` +go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 +go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 +``` + The plugins will be installed in $GOBIN, defaulting to $GOPATH/bin which is default HOME_DIR/go/bin. It must be in your $PATH for the protocol compiler protoc to find it. For linux execute: ``` diff --git a/kuksa_go_client/kuksa_client/commn.go b/kuksa_go_client/kuksa_client/commn.go index 452c260..afa0753 100644 --- a/kuksa_go_client/kuksa_client/commn.go +++ b/kuksa_go_client/kuksa_client/commn.go @@ -81,7 +81,7 @@ func (cc *KuksaClientCommWs) startCommunication() error { if cc.Config.Insecure { // Open an insecure websocket serverUrl := url.URL{Scheme: "ws", Host: cc.Config.ServerAddress + ":" + cc.Config.ServerPort} - log.Printf("Connecting to " + serverUrl.String()) + log.Printf("Connecting to %s", serverUrl.String()) // Connect to the Kuksa Websocket var err error @@ -94,7 +94,7 @@ func (cc *KuksaClientCommWs) startCommunication() error { } else { // Open a secure websocket serverUrl := url.URL{Scheme: "wss", Host: cc.Config.ServerAddress + ":" + cc.Config.ServerPort} - log.Printf("Connecting to " + serverUrl.String()) + log.Printf("Connecting to %s", serverUrl.String()) // Load Client cert cert, err := tls.LoadX509KeyPair(cc.Config.CertsDir+"/Client.pem", cc.Config.CertsDir+"/Client.key") diff --git a/kuksa_go_client/main.go b/kuksa_go_client/main.go index 05842aa..6b5c3e5 100644 --- a/kuksa_go_client/main.go +++ b/kuksa_go_client/main.go @@ -121,7 +121,7 @@ func main() { if err != nil { log.Printf("Set Value Error: %v", err) } else { - log.Printf("Vehicle.OBD.DTCList Set: " + valstr) + log.Printf("Vehicle.OBD.DTCList Set: %s", valstr) } values, err = backend.GetValueFromKuksaVal("Vehicle.OBD.DTCList", "value")