cockroachdb / cockroachdb/cockroach
docgen: for some reason array square brackets are always trimmed
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
As found during the review of #150598, it appears that we unconditionally trim the array square brackets from the type name, so even if a builtin function takes an array as the argument, the array element type will be shown in the markdown. I think it's because of this line https://github.com/cockroachdb/cockroach/blob/064aa707cdc0283bea483b513e6d6df97219ca93/pkg/cmd/docgen/funcs.go#L276
For example, as of that PR we'll support `ltree[] ?<@ ltree`, yet `ltree ?<@ ltree` is shown in the markdown.
This was added in ancient times in #19153, and I don't see any discussion around it. We should figure out why that trimming logic is there and adjust it somehow so that proper arrays are shown when applicable.
Jira issue: CRDB-53714
Contributor guide
Assessment
This issue has not been assessed yet.