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
Currently, the %#v formatting verb places everything on one line. It would be useful for debugging to add a variation that outputs an indented version of the Go-Syntax representation.
The text was updated successfully, but these errors were encountered:
FiloSottile
changed the title
fmt: Go 2 verb for indented Go-syntax representation of the value
proposal: fmt verb for indented Go-syntax representation of the value
Aug 31, 2018
A feature like this in fmt has been proposed and rejected previously in #23026. The complexity of multi line indentation of go syntax seems best served by another package outside of fmt instead of making fmt more complex.
If you have additional arguments that you think would change the conclusion from #23026, feel free to reopen this issue with additional context why fmt should contain this feature and external packages like https://godoc.org/github.com/kr/pretty or https://github.com/sanity-io/litter are not adequate to full fill the debugging use case.
Please also see https://golang.org/doc/faq#x_in_std for a general note why most new code not directly needed by compiler, runtime or features for existing packages that are not used heavily should better life outside the standard library.
Currently, the
%#v
formatting verb places everything on one line. It would be useful for debugging to add a variation that outputs an indented version of the Go-Syntax representation.https://github.com/sanity-io/litter
The text was updated successfully, but these errors were encountered: