( registry string, commitID uuid.UUID, digestType DigestType, )
| 95 | } |
| 96 | |
| 97 | func newCommitKey( |
| 98 | registry string, |
| 99 | commitID uuid.UUID, |
| 100 | digestType DigestType, |
| 101 | ) (*commitKey, error) { |
| 102 | if registry == "" { |
| 103 | return nil, errors.New("empty registry when constructing CommitKey") |
| 104 | } |
| 105 | if commitID == uuid.Nil { |
| 106 | return nil, errors.New("empty commitID when constructing CommitKey") |
| 107 | } |
| 108 | if _, ok := digestTypeToString[digestType]; !ok { |
| 109 | return nil, fmt.Errorf("unknown DigestType when constructing CommitKey: %v", digestType) |
| 110 | } |
| 111 | return &commitKey{ |
| 112 | registry: registry, |
| 113 | commitID: commitID, |
| 114 | digestType: digestType, |
| 115 | }, nil |
| 116 | } |
| 117 | |
| 118 | func (m *commitKey) Registry() string { |
| 119 | return m.registry |
no outgoing calls
no test coverage detected
searching dependent graphs…