GoExpertProgramming
GoExpertProgramming copied to clipboard
格式化输入输出素材收集
本issue用于收集、记录格式化输入输出方面的知识。
内置函数println和print会将结果打印到标准错误
中,这就决定了它不能用于Example
测试中:
// The print built-in function formats its arguments in an
// implementation-specific way and writes the result to standard error.
// Print is useful for bootstrapping and debugging; it is not guaranteed
// to stay in the language.
func print(args ...Type)
// The println built-in function formats its arguments in an
// implementation-specific way and writes the result to standard error.
// Spaces are always added between arguments and a newline is appended.
// Println is useful for bootstrapping and debugging; it is not guaranteed
// to stay in the language.
func println(args ...Type)