func Fprintln(w io.Writer, a ...interface{}) (n int, err error)
Fprintln采用默认格式将其参数格式化并写入w。总是会在相邻参数的输出之间添加空格并在输出结束后添加换行符。返回写入的字节数和遇到的任何错误。
package main
import (
"fmt"
"os"
)
func main(){
fmt.Fprintln(os.Stderr, "hello","world")
}
运行结果:hello world