MCPcopy
hub / github.com/getsops/sops / WritePipe

Function WritePipe

cmd/sops/subcommand/exec/exec_unix.go:23–33  ·  view source on GitHub ↗
(pipe string, contents []byte)

Source from the content-addressed store, hash-verified

21}
22
23func WritePipe(pipe string, contents []byte) {
24 handle, err := os.OpenFile(pipe, os.O_WRONLY, 0600)
25
26 if err != nil {
27 os.Remove(pipe)
28 log.Fatal(err)
29 }
30
31 handle.Write(contents)
32 handle.Close()
33}
34
35func GetPipe(dir, filename string) (string, error) {
36 tmpfn := filepath.Join(dir, filename)

Callers 1

ExecWithFileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected