Skip to content

do not null slice pointers by default#9

Merged
davidnewhall merged 3 commits intomainfrom
dn2_null_slices
May 26, 2025
Merged

do not null slice pointers by default#9
davidnewhall merged 3 commits intomainfrom
dn2_null_slices

Conversation

@davidnewhall
Copy link
Contributor

(Struct | null)[] sucks. This fixes it. If you like it the other way, pass true to the new override.

Example:

	goat := goty.NewGoty(&goty.Config{
		Docs: docs,
		GlobalOverrides: goty.Override{
			NullSlicePointers: true,
		},
		Overrides: goty.Overrides{
			cnfg.Duration{}:                 {Type: "string"},
			reflect.TypeOf(time.Weekday(0)): {Comment: "The day of the week."},
		},
	})

@davidnewhall davidnewhall merged commit 6c52e2d into main May 26, 2025
8 checks passed
@davidnewhall davidnewhall deleted the dn2_null_slices branch May 26, 2025 22:28
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

Successfully merging this pull request may close these issues.

1 participant