Skip to content

fix: preserve initial values in pointer-to-struct slices - #452

Open
yuefdev wants to merge 1 commit into
caarlos0:mainfrom
yuefdev:fix/slice-pointer-initial-values-sol
Open

yuefdev wants to merge 1 commit into
caarlos0:mainfrom
yuefdev:fix/slice-pointer-initial-values-sol

Conversation

@yuefdev

@yuefdev yuefdev commented Oct 18, 2026

Copy link
Copy Markdown

Preserve initial elements when parsing a pointer to a slice of structs. Updating one environment field currently clears unspecified fields and drops trailing initial elements, unlike the non-pointer slice path.

Use the dereferenced slice as the source of initial values. The regression fails before the fix; full tests, vet and gofmt pass. Golangci-lint reports zero new issues against the base; full lint flags formatting and an ineffectual assignment in unchanged files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant