goharbor / go-client

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

question:Why use the pointer?(improvement) #26

Open Piwriw opened 8 months ago

Piwriw commented 8 months ago

Description

type ListProjectsOK struct {

    /* Link refers to the previous page and next page
     */
    Link string

    /* The total count of projects
     */
    XTotalCount int64

    Payload []*models.Project
}

Why to use the point in Payload?This outputs an address, not a string? image

This could be changed to not using a pointer, would it be better?

type ListProjectsOK struct {

    /* Link refers to the previous page and next page
     */
    Link string

    /* The total count of projects
     */
    XTotalCount int64

    Payload []models.Project
}

image Want to support I want to know it is ok? .There are a lot of problems just like this. If it is no problem, I will create PR to sovle and add some Test Func If you agree with me, Please LGMT Your name.