@@ -37,7 +37,7 @@ import (
37
37
38
38
const (
39
39
// defaultTagConcurrency is the default concurrency of tagging.
40
- defaultTagConcurrency int64 = 5 // This value is consistent with dockerd
40
+ defaultTagConcurrency int = 5 // This value is consistent with dockerd
41
41
42
42
// defaultTagNMaxMetadataBytes is the default value of
43
43
// TagNOptions.MaxMetadataBytes.
@@ -58,7 +58,7 @@ var DefaultTagNOptions TagNOptions
58
58
type TagNOptions struct {
59
59
// Concurrency limits the maximum number of concurrent tag tasks.
60
60
// If less than or equal to 0, a default (currently 5) is used.
61
- Concurrency int64
61
+ Concurrency int
62
62
63
63
// MaxMetadataBytes limits the maximum size of metadata that can be cached
64
64
// in the memory.
@@ -118,7 +118,7 @@ func TagN(ctx context.Context, target Target, srcReference string, dstReferences
118
118
return err
119
119
}
120
120
121
- eg , egCtx := syncutil .LimitGroup (ctx , int ( opts .Concurrency ) )
121
+ eg , egCtx := syncutil .LimitGroup (ctx , opts .Concurrency )
122
122
for _ , dstRef := range dstReferences {
123
123
eg .Go (func (dst string ) func () error {
124
124
return func () error {
@@ -137,7 +137,7 @@ func TagN(ctx context.Context, target Target, srcReference string, dstReferences
137
137
if err != nil {
138
138
return err
139
139
}
140
- eg , egCtx := syncutil .LimitGroup (ctx , int ( opts .Concurrency ) )
140
+ eg , egCtx := syncutil .LimitGroup (ctx , opts .Concurrency )
141
141
for _ , dstRef := range dstReferences {
142
142
eg .Go (func (dst string ) func () error {
143
143
return func () error {
@@ -354,7 +354,7 @@ var DefaultTagBytesNOptions TagBytesNOptions
354
354
type TagBytesNOptions struct {
355
355
// Concurrency limits the maximum number of concurrent tag tasks.
356
356
// If less than or equal to 0, a default (currently 5) is used.
357
- Concurrency int64
357
+ Concurrency int
358
358
}
359
359
360
360
// TagBytesN describes the contentBytes using the given mediaType, pushes it,
@@ -369,7 +369,7 @@ func TagBytesN(ctx context.Context, target Target, mediaType string, contentByte
369
369
if opts .Concurrency <= 0 {
370
370
opts .Concurrency = defaultTagConcurrency
371
371
}
372
- eg , egCtx := syncutil .LimitGroup (ctx , int ( opts .Concurrency ) )
372
+ eg , egCtx := syncutil .LimitGroup (ctx , opts .Concurrency )
373
373
if refPusher , ok := target .(registry.ReferencePusher ); ok {
374
374
for _ , reference := range references {
375
375
eg .Go (func (ref string ) func () error {
0 commit comments