summaryrefslogtreecommitdiff
path: root/unix.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-23 22:47:39 -0600
committerJeff Carr <[email protected]>2024-01-23 22:47:39 -0600
commit7c82f918aa8da546f038ed5cf4c682f5787a191f (patch)
tree62b0725a7b96ee2547fbfa24b81c0d0dbf15ebe3 /unix.go
parentedf74e160e047e3bad86f7cf52032c12cf0813f0 (diff)
detect go.sum is clean
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'unix.go')
-rw-r--r--unix.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/unix.go b/unix.go
index c4b4828..b4f604f 100644
--- a/unix.go
+++ b/unix.go
@@ -3,6 +3,7 @@ package repostatus
import (
"errors"
+ "io/ioutil"
"os"
"os/exec"
"os/user"
@@ -203,3 +204,11 @@ func VerifyLocalGoRepo(gorepo string) bool {
log.Log(INFO, "go directory:", gitDir)
return IsDirectory(gitDir)
}
+
+func readFileToString(filename string) (string, error) {
+ data, err := ioutil.ReadFile(filename)
+ if err != nil {
+ return "", err
+ }
+ return strings.TrimSpace(string(data)), nil
+}