learning_go/ceph_socket/main.go
2025-11-26 20:27:28 +03:00

22 lines
294 B
Go

package main
import (
"fmt"
"log"
"gopkg.in/pipe.v2"
)
func main() {
args := []string{"25"}
p := pipe.Line(
pipe.ReadFile("go.mod"),
pipe.Exec("grep",args...),
)
output, err := pipe.CombinedOutput(p)
if err != nil {
log.Fatal("Shit happened")
}
fmt.Println(string(output))
}