packagemainimport("fmt""os")funcmain(w,ax){r,w:=io.Pipe()gofunc(){idx,name:="4th","Mars"w.Write([]byte(fmt.Sprintf("The %s planet is %s.\n",idx,name)))w.Write([]byte(fmt.Sprint("The ",idx," planet is ",name,".\n")))w.Write([]byte(fmt.Sprintln("The",idx,"planet is",name,".")))w.Close()}()if_,err:=io.Copy(os.Stdout,r);err!=nil{log.Fatal(err)}}