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: Printf ignores width specification for nil values #4772
When the format string passed to Printf and friends specifies a width for a value (e.g. "%10v"), the width is ignored if the value is nil. The algorithm should probably be changed to convert nil to the string "<nil>", and then apply width and other specifications just like for any other string value. What steps will reproduce the problem? http://play.golang.org/p/tulmfQ5QYE What is the expected output? | x| | 1| | true| | <nil>| | y| | <nil>| What do you see instead? | x| | 1| | true| |<nil>| | y| |<nil>| Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? Windows 7 Which version are you using? (run 'go version') go version devel +aba17f1b93db Thu Feb 07 18:54:21 2013 +0800 windows/amd64