ModuleKeyToCommitKey converts a ModuleKey to a CommitKey. This is purely lossy - a ModuleKey has more information than a CommitKey, and a CommitKey does not have any information that a ModuleKey does not have.
(moduleKey ModuleKey)
| 104 | // This is purely lossy - a ModuleKey has more information than a CommitKey, and a |
| 105 | // CommitKey does not have any information that a ModuleKey does not have. |
| 106 | func ModuleKeyToCommitKey(moduleKey ModuleKey) (CommitKey, error) { |
| 107 | digest, err := moduleKey.Digest() |
| 108 | if err != nil { |
| 109 | return nil, err |
| 110 | } |
| 111 | return newCommitKey(moduleKey.FullName().Registry(), moduleKey.CommitID(), digest.Type()) |
| 112 | } |
| 113 | |
| 114 | // *** PRIVATE *** |
| 115 |
searching dependent graphs…