package builtins import ( "io" "strings" ) type Echo struct{} func (e *Echo) Name() string { return "echo" } func (e *Echo) Execute(arguments []string, _ io.Reader, stdout io.Writer, stderr io.Writer) uint8 { _, err := stdout.Write([]byte(strings.Join(arguments, " "))) if err != nil { stderr.Write([]byte(err.Error())) return 1 } return 0 }