go-client
go-client copied to clipboard
Listing Artifacts and Repositories returns a swagger error
I'm using the below code to get the list of Repositories from harbor:
c := &harbor.ClientSetConfig{
URL: h.url,
Password: h.password,
Username: h.username,
Insecure: true,
}
cs, err := harbor.NewClientSet(c)
if err != nil {
return "", err
}
v2Client := cs.V2()
_, err := v2Client.Repository.ListRepositories(context.TODO(), repository.NewListRepositoriesParams().WithProjectName(h.projectName))
if err != nil {
fmt.Println(err)
}
And I get the below error:
&[] (*[]*models.Repository) is not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface
Expected result: Should get the exact REST API error code
golang version: 1.20 linux/amd64
I met the same issue, How to do with it?
do you still see that issue?
I met the same issue, How to do with it?
are you using the latest version of the library?
are you using the latest version of the library?
yes,the version is v0.210.0, and Go version is 1.19
i met the same issue,How to do with it?
i met the same issue,How to do with it?
No Body fix it, maybe you should try fix code just like me .https://github.com/goharbor/go-client/pull/28 maybe can help u