File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,9 @@ func (manifest Manifest2822) String() string {
203
203
}
204
204
205
205
func (entry * Manifest2822Entry ) SetGitRepo (arch string , repo string ) {
206
+ if entry .Paragraph .Values == nil {
207
+ entry .Paragraph .Values = map [string ]string {}
208
+ }
206
209
entry .Paragraph .Values [arch + "-GitRepo" ] = repo
207
210
}
208
211
@@ -221,6 +224,9 @@ func (entry Manifest2822Entry) ArchGitFetch(arch string) string {
221
224
}
222
225
223
226
func (entry * Manifest2822Entry ) SetGitCommit (arch string , commit string ) {
227
+ if entry .Paragraph .Values == nil {
228
+ entry .Paragraph .Values = map [string ]string {}
229
+ }
224
230
entry .Paragraph .Values [arch + "-GitCommit" ] = commit
225
231
}
226
232
@@ -257,6 +263,16 @@ func (entry Manifest2822Entry) HasSharedTag(tag string) bool {
257
263
return false
258
264
}
259
265
266
+ // HasArchitecture returns true if the given architecture exists in entry.Architectures
267
+ func (entry Manifest2822Entry ) HasArchitecture (arch string ) bool {
268
+ for _ , existingArch := range entry .Architectures {
269
+ if arch == existingArch {
270
+ return true
271
+ }
272
+ }
273
+ return false
274
+ }
275
+
260
276
func (manifest Manifest2822 ) GetTag (tag string ) * Manifest2822Entry {
261
277
for _ , entry := range manifest .Entries {
262
278
if entry .HasTag (tag ) {
You can’t perform that action at this time.
0 commit comments