aboutsummaryrefslogtreecommitdiff
path: root/cmd/prefix/main.go
blob: 6ce4106b7e440718b19d569261468ca2c6f88e21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main

import (
	"io"
	"os"
	"strings"

	"within.website/x/internal"
	"within.website/x/writer"
)

func main() {
	internal.HandleStartup()

	prefix := strings.Join(os.Args[1:], " ") + " | "
	wr := writer.LineSplitting(writer.PrefixWriter(prefix, os.Stdout))
	_, err := io.Copy(wr, os.Stdin)
	if err != nil {
		panic(err)
	}
}