From d113dc77ae1aa4855463255ce08333a0cac81b13 Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Mon, 21 Aug 2017 12:16:42 +0200 Subject: [PATCH] lfs: remove unused gitscanner_cmd.go --- lfs/gitscanner_cmd.go | 49 ------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 lfs/gitscanner_cmd.go diff --git a/lfs/gitscanner_cmd.go b/lfs/gitscanner_cmd.go deleted file mode 100644 index 355fa567..00000000 --- a/lfs/gitscanner_cmd.go +++ /dev/null @@ -1,49 +0,0 @@ -package lfs - -import ( - "bufio" - "io" - "os/exec" - "strings" - - "github.com/rubyist/tracerx" -) - -type wrappedCmd struct { - Stdin io.WriteCloser - Stdout *bufio.Reader - Stderr *bufio.Reader - *exec.Cmd -} - -// startCommand starts up a command and creates a stdin pipe and a buffered -// stdout & stderr pipes, wrapped in a wrappedCmd. The stdout buffer will be of stdoutBufSize -// bytes. -func startCommand(command string, args ...string) (*wrappedCmd, error) { - cmd := exec.Command(command, args...) - stdout, err := cmd.StdoutPipe() - if err != nil { - return nil, err - } - stderr, err := cmd.StderrPipe() - if err != nil { - return nil, err - } - - stdin, err := cmd.StdinPipe() - if err != nil { - return nil, err - } - - tracerx.Printf("run_command: %s %s", command, strings.Join(args, " ")) - if err := cmd.Start(); err != nil { - return nil, err - } - - return &wrappedCmd{ - stdin, - bufio.NewReaderSize(stdout, stdoutBufSize), - bufio.NewReaderSize(stderr, stdoutBufSize), - cmd, - }, nil -}