Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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.
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).