(path string, digest Digest)
| 117 | func (*fileNode) isFileNode() {} |
| 118 | |
| 119 | func validateFileNodeParameters(path string, digest Digest) error { |
| 120 | if path == "" { |
| 121 | return errors.New("path was empty") |
| 122 | } |
| 123 | normalizedPath, err := normalpath.NormalizeAndValidate(path) |
| 124 | if err != nil { |
| 125 | return fmt.Errorf("path %q was not valid: %w", path, err) |
| 126 | } |
| 127 | if path != normalizedPath { |
| 128 | return fmt.Errorf("path %q was not equal to normalized path %q", path, normalizedPath) |
| 129 | } |
| 130 | if digest == nil { |
| 131 | return errors.New("no digest specified") |
| 132 | } |
| 133 | return nil |
| 134 | } |
no test coverage detected
searching dependent graphs…