浏览代码

modify some files

Signed-off-by: liwenqi <vikilwq@zju.edu.cn>

update some files in the folder of distribution/xfer

Signed-off-by: liwenqi <vikilwq@zju.edu.cn>

correct again

Signed-off-by: liwenqi <vikilwq@zju.edu.cn>
liwenqi 8 年之前
父节点
当前提交
128d07d349

+ 1 - 1
daemon/cluster/cluster.go

@@ -287,7 +287,7 @@ func (c *Cluster) Init(req types.InitRequest) (string, error) {
 	// will be used as local address, if it belongs to this system.
 	// If the advertise address is not local, then we try to find
 	// a system address to use as local address. If this fails,
-	// we give up and ask user to pass the listen address.
+	// we give up and ask the user to pass the listen address.
 	if net.ParseIP(localAddr).IsUnspecified() {
 		advertiseIP := net.ParseIP(advertiseHost)
 

+ 2 - 2
daemon/events/events.go

@@ -78,8 +78,8 @@ func (e *Events) Evict(l chan interface{}) {
 	e.pub.Evict(l)
 }
 
-// Log broadcasts event to listeners. Each listener has 100 millisecond for
-// receiving event or it will be skipped.
+// Log broadcasts event to listeners. Each listener has 100 milliseconds to
+// receive the event or it will be skipped.
 func (e *Events) Log(action, eventType string, actor eventtypes.Actor) {
 	eventsCounter.Inc()
 	now := time.Now().UTC()

+ 1 - 1
distribution/metadata/v2_metadata_service.go

@@ -37,7 +37,7 @@ type V2Metadata struct {
 	HMAC string
 }
 
-// CheckV2MetadataHMAC return true if the given "meta" is tagged with a hmac hashed by the given "key".
+// CheckV2MetadataHMAC returns true if the given "meta" is tagged with a hmac hashed by the given "key".
 func CheckV2MetadataHMAC(meta *V2Metadata, key []byte) bool {
 	if len(meta.HMAC) == 0 || len(key) == 0 {
 		return len(meta.HMAC) == 0 && len(key) == 0

+ 2 - 2
distribution/xfer/download.go

@@ -26,7 +26,7 @@ type LayerDownloadManager struct {
 	tm         TransferManager
 }
 
-// SetConcurrency set the max concurrent downloads for each pull
+// SetConcurrency sets the max concurrent downloads for each pull
 func (ldm *LayerDownloadManager) SetConcurrency(concurrency int) {
 	ldm.tm.SetConcurrency(concurrency)
 }
@@ -87,7 +87,7 @@ type DownloadDescriptorWithRegistered interface {
 // the layer store, and the key is not used by an in-progress download, the
 // Download method is called to get the layer tar data. Layers are then
 // registered in the appropriate order.  The caller must call the returned
-// release function once it is is done with the returned RootFS object.
+// release function once it is done with the returned RootFS object.
 func (ldm *LayerDownloadManager) Download(ctx context.Context, initialRootFS image.RootFS, layers []DownloadDescriptor, progressOutput progress.Output) (image.RootFS, func(), error) {
 	var (
 		topLayer       layer.Layer

+ 1 - 1
distribution/xfer/transfer.go

@@ -300,7 +300,7 @@ func NewTransferManager(concurrencyLimit int) TransferManager {
 	}
 }
 
-// SetConcurrency set the concurrencyLimit
+// SetConcurrency sets the concurrencyLimit
 func (tm *transferManager) SetConcurrency(concurrency int) {
 	tm.mu.Lock()
 	tm.concurrencyLimit = concurrency

+ 1 - 1
distribution/xfer/upload.go

@@ -19,7 +19,7 @@ type LayerUploadManager struct {
 	tm TransferManager
 }
 
-// SetConcurrency set the max concurrent uploads for each push
+// SetConcurrency sets the max concurrent uploads for each push
 func (lum *LayerUploadManager) SetConcurrency(concurrency int) {
 	lum.tm.SetConcurrency(concurrency)
 }