Remove unused code
This commit is contained in:
parent
d9439333fe
commit
25d2811293
@ -7,7 +7,6 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
@ -53,25 +52,6 @@ func copyFile(src, dst string) {
|
|||||||
check(err)
|
check(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func pipe(bin string, arg []string, src string) []byte {
|
|
||||||
cmd := exec.Command(bin, arg...)
|
|
||||||
in, err := cmd.StdinPipe()
|
|
||||||
check(err)
|
|
||||||
out, err := cmd.StdoutPipe()
|
|
||||||
check(err)
|
|
||||||
err = cmd.Start()
|
|
||||||
check(err)
|
|
||||||
_, err = in.Write([]byte(src))
|
|
||||||
check(err)
|
|
||||||
err = in.Close()
|
|
||||||
check(err)
|
|
||||||
bytes, err := io.ReadAll(out)
|
|
||||||
check(err)
|
|
||||||
err = cmd.Wait()
|
|
||||||
check(err)
|
|
||||||
return bytes
|
|
||||||
}
|
|
||||||
|
|
||||||
func sha1Sum(s string) string {
|
func sha1Sum(s string) string {
|
||||||
h := sha1.New()
|
h := sha1.New()
|
||||||
h.Write([]byte(s))
|
h.Write([]byte(s))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user