Skip to content

Conversation

@SilverCory
Copy link

This allows sql:"..." to recurse into the struct tagged.

@kisielk
Copy link
Owner

kisielk commented Mar 24, 2021

Hm, wouldn't just ".." be more familiar looking?

@SilverCory
Copy link
Author

I was going along the lines of func(t ...T), if I saw .. I would thing up in the hierarchy not down

@MMulthaupt
Copy link

But this isn't about varargs. If it needs to be any amount of dots, I believe a single . makes most sense since you are accessing a member of the struct, going down one level in the hierarchy, which is exactly what it looks like elsewhere in the language.

A different idea: add another tag-field. Kinda how for json we may write json:",omitempty" we could write sql:",recurse".

@SilverCory SilverCory changed the title Allow recursion using ... Allow recursion using ,recurse Feb 6, 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

Successfully merging this pull request may close these issues.

3 participants