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.
fmt: width and precision flag syntax is not explicitly defined #7048
While the fmt flags for width and precision are probably well know to most people, their syntax is not explicitly defined in the fmt package documentation, rather only having examples from which to derive the syntax. In the Printing section: "For example, given 123.45 the format %6.2f prints 123.45 while %.4g prints 123.5." and other examples in the [n] numbered argument text. In the Scanning section: "Width is interpreted in the input text (%5s means at most five runes of input will be read to scan a string) but there is no syntax for scanning with a precision (no %5.2f, just %5f)." Which version are you using? (run 'go version') go1.2