(root, rel string)
| 325 | } |
| 326 | |
| 327 | func readRelativeFile(root, rel string) ([]byte, bool, error) { |
| 328 | path := filepath.Join(root, rel) |
| 329 | content, err := os.ReadFile(path) |
| 330 | if err == nil { |
| 331 | return content, true, nil |
| 332 | } |
| 333 | if os.IsNotExist(err) { |
| 334 | return nil, false, nil |
| 335 | } |
| 336 | return nil, false, err |
| 337 | } |
| 338 | |
| 339 | func sha256Hex(content []byte) string { |
| 340 | sum := sha256.Sum256(content) |
no test coverage detected