(filePath string)
| 299 | } |
| 300 | |
| 301 | func hashFile(filePath string) ([]byte, error) { |
| 302 | var result []byte |
| 303 | file, err := os.Open(filePath) |
| 304 | if err != nil { |
| 305 | return result, err |
| 306 | } |
| 307 | defer file.Close() |
| 308 | hash := sha256.New() |
| 309 | if _, err := io.Copy(hash, file); err != nil { |
| 310 | return result, err |
| 311 | } |
| 312 | return hash.Sum(result), nil |
| 313 | } |
| 314 | |
| 315 | func runEditor(path string) error { |
| 316 | envVar := "SOPS_EDITOR" |
no outgoing calls
no test coverage detected