20 lines
260 B
Go
20 lines
260 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
var (
|
|
n = flag.Bool("n", false, "omit trailing newline")
|
|
sep = flag.String("s", " ", "separator")
|
|
)
|
|
|
|
func main() {
|
|
flag.Parse()
|
|
fmt.Print(strings.Join(flag.Args(), *sep))
|
|
if !*n {
|
|
fmt.Println()
|
|
}
|
|
}
|