1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-06 06:45:18 +01:00
Files
2017-10-10 09:52:53 -07:00

20 lines
354 B
Go

package main
import (
"io/ioutil"
"os"
"github.com/goware/prefixer"
)
func main() {
// Prefixer accepts anything that implements io.Reader interface
prefixReader := prefixer.New(os.Stdin, "> ")
// Read all prefixed lines from STDIN into a buffer
buffer, _ := ioutil.ReadAll(prefixReader)
// Write buffer to STDOUT
os.Stdout.Write(buffer)
}