Closed asafsonnv closed 8 months ago
Hi,
Thanks for this great project. It simplifies our work a lot. The code is pretty clear but I have an issue when trying to call gnoigo.Execute().
I followed your example in the README and I got an error. my code is:
conn, err := grpc.DialContext(ctx, serverAddress, opts) if err != nil { log.Fatalf("failed to dial server: %v", err) } defer conn.Close() clients := gnoigo.NewClients(conn) rebootStatusOp := spb.NewRebootStatusOperation() response, err := gnoigo.Execute(ctx, clients, rebootStatusOp) --------> Error is here fmt.Println(response, err)
the error is: type *"github.com/openconfig/gnoigo/system".RebootStatusOperation of rebootStatusOp does not match gnoigo.Operation[T] (cannot infer T)
how can I overcome this issue?
Thanks in advance, Asaf.
What version of Go are you using?
go version go1.20.13 linux/amd64
Ah, it requires 1.21 for the improved generics inference. I see the go.mod file is behind. I'll fix that.
Hi,
Thanks for this great project. It simplifies our work a lot. The code is pretty clear but I have an issue when trying to call gnoigo.Execute().
I followed your example in the README and I got an error. my code is:
the error is: type *"github.com/openconfig/gnoigo/system".RebootStatusOperation of rebootStatusOp does not match gnoigo.Operation[T] (cannot infer T)
how can I overcome this issue?
Thanks in advance, Asaf.