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

Is there an example for golang with go get? #18

Open
DachuanZhao opened this issue Jun 28, 2021 · 3 comments
Open

Is there an example for golang with go get? #18

DachuanZhao opened this issue Jun 28, 2021 · 3 comments

Comments

@DachuanZhao
Copy link

I have run

go get github.com/figroc/tensorflow-serving-client@v2

,
then what should I do ?

@figroc
Copy link
Owner

figroc commented Jul 2, 2021

There is a test in tests/go/. You might check it out.

@budo76
Copy link

budo76 commented Jul 29, 2021

Hi,
I'm creating a go program and want to use your module. I've done "go get" and "go mod download" and in the code:

import (
	"github.com/figroc/tensorflow-serving-client"
)

But I get this error:

no required module provides package github.com/figroc/tensorflow-serving-client; to add it:
        go get github.com/figroc/tensorflow-serving-client

Obviusly already done "get" and the sorces have been downloaded ... what shoudl I do?

@budo76
Copy link

budo76 commented Jul 29, 2021

Wow... I somehow solved. First the package was wrong, I had to import the specific package and not only the module (and this is obvious - my fault), so something like this:

import (
	tfs "github.com/figroc/tensorflow-serving-client/v2/go/tensorflow_serving/apis"
)

Note that "v2" on the path is necessary otherwise the version "v2.1.0+incompatible" would be loaded instead of the latest "v2.5.1"... and in the "v2.1.0" there's no "go" subdir so no package to find

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants