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

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

Open
Piwriw opened this issue Mar 8, 2024 · 0 comments
Open

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

Piwriw opened this issue Mar 8, 2024 · 0 comments

Comments

@Piwriw
Copy link

Piwriw commented Mar 8, 2024

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.

@Piwriw Piwriw changed the title question:Why use the point?(improvement) question:Why use the pointer?(improvement) Mar 8, 2024
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

1 participant