diff options
| author | Jeff Carr <[email protected]> | 2024-01-23 22:47:39 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-23 22:47:39 -0600 |
| commit | 7c82f918aa8da546f038ed5cf4c682f5787a191f (patch) | |
| tree | 62b0725a7b96ee2547fbfa24b81c0d0dbf15ebe3 /unix.go | |
| parent | edf74e160e047e3bad86f7cf52032c12cf0813f0 (diff) | |
detect go.sum is clean
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'unix.go')
| -rw-r--r-- | unix.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 +} |
