You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we'd parse the string for all ${vars} and iterate through all of the QueryArg and if any are missing we'd return an error. I like wrapping in ${} as it makes it a bit easier to read, it's easier to parse out (we can actually use os.Expand almost turnkey) and it's inline with the current proposal for adding string interpolation the language. Though, that's also a con IMO...feels like we'd eventually be trampling on std lib in a bit of a weird way, but that proposal might never be accepted so probably best to sort it out if it ever becomes an issue if we're otherwise happy with that pattern.
I'm not loving the naming though...maybe something like:
I'm trying to sort out a good UX for creating a query, what do people think about:
This would change the
Query
method contract from:to:
we'd parse the string for all
${vars}
and iterate through all of the QueryArg and if any are missing we'd return an error. I like wrapping in${}
as it makes it a bit easier to read, it's easier to parse out (we can actually useos.Expand
almost turnkey) and it's inline with the current proposal for adding string interpolation the language. Though, that's also a con IMO...feels like we'd eventually be trampling on std lib in a bit of a weird way, but that proposal might never be accepted so probably best to sort it out if it ever becomes an issue if we're otherwise happy with that pattern.I'm not loving the naming though...maybe something like:
I feel like
Do
is a little more idiomatic Go (see: http.Client.Do) and we avoidQuery(<query>)
or using the language acronym as a struct type.The text was updated successfully, but these errors were encountered: