goharbor / go-client

Client library with golang for accessing Harbor API.
Apache License 2.0
39 stars 18 forks source link

get artifacts addation error #20

Open Firstnsnd opened 11 months ago

Firstnsnd commented 11 months ago

My code is as follows:

param := artifact.NewGetAdditionParams().
        WithContext(ctx).
        WithProjectName(imageSpaceName).
        WithRepositoryName(imageName).
        WithReference(reference).
        WithAddition("build_history")

    replyAddition, err := client.V2().Artifact.GetAddition(ctx, param)

this code will return an error: json: cannot unmarshal array into Go value of type string

github.com/goharbor/go-client v0.26.2

Vad1mo commented 7 months ago

did you resovel the problem

Firstnsnd commented 6 months ago

did you resovel the proble

I define a struct include this go-client,and implement a method to get artifacts addation