Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
proposal: fmt: use "%##v" "%++v" to format a value with indented-multi-lines style string #23026
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
I would favor this functionallity having its own package instead of making the fmt flag logic and functionality more complex too.
I would also recommend to avoid giving different meaning to multiple occurences of format flags but to use a new one instead to signify pretty printing using multiple lines.
referenced this issue
Dec 22, 2017
changed the title
fmt: use "%##v" "%++v" to format a value with indented-multi-lines style string
Jan 13, 2018
The correct link for the code appears to be https://github.com/vipally/go/tree/ally_master/src/fmt, which uses %@#v and %@+v, I assume because the fmt.Formatter API cannot express two of a given flag.
Everyone who has commented has said that this can be best done as a separate package, or multiple separate packages if different uses need different rules. That seems right to me too.
Closing after discussion with proposal-review (everyone agreed).