瀏覽代碼

Merge pull request #45387 from cuishuang/master

fix some comments
Sebastiaan van Stijn 2 年之前
父節點
當前提交
801202349a

+ 1 - 1
daemon/containerd/image_list.go

@@ -525,7 +525,7 @@ func getManifestPlatform(ctx context.Context, store content.Provider, manifestDe
 	return platforms.Normalize(platform), nil
 }
 
-// isImageManifests returns true if the manifest has any layer that is a known image layer.
+// isImageManifest returns true if the manifest has any layer that is a known image layer.
 // Some manifests use the image media type for compatibility, even if they are not a real image.
 func isImageManifest(mfst v1.Manifest) bool {
 	for _, l := range mfst.Layers {

+ 1 - 1
daemon/kill.go

@@ -178,7 +178,7 @@ func (daemon *Daemon) Kill(container *containerpkg.Container) error {
 	return nil
 }
 
-// killPossibleDeadProcess is a wrapper around killSig() suppressing "no such process" error.
+// killPossiblyDeadProcess is a wrapper around killSig() suppressing "no such process" error.
 func (daemon *Daemon) killPossiblyDeadProcess(container *containerpkg.Container, sig syscall.Signal) error {
 	err := daemon.killWithSignal(container, sig)
 	if errdefs.IsNotFound(err) {

+ 1 - 1
daemon/logger/journald/journald.go

@@ -76,7 +76,7 @@ func init() {
 	}
 }
 
-// sanitizeKeyMode returns the sanitized string so that it could be used in journald.
+// sanitizeKeyMod returns the sanitized string so that it could be used in journald.
 // In journald log, there are special requirements for fields.
 // Fields must be composed of uppercase letters, numbers, and underscores, but must
 // not start with an underscore.

+ 1 - 1
daemon/logger/plugin.go

@@ -31,7 +31,7 @@ func RegisterPluginGetter(plugingetter getter.PluginGetter) {
 	pluginGetter = plugingetter
 }
 
-// GetDriver returns a logging driver by its name.
+// getPlugin returns a logging driver by its name.
 // If the driver is empty, it looks for the local driver.
 func getPlugin(name string, mode int) (Creator, error) {
 	p, err := pluginGetter.Get(name, extName, mode)

+ 1 - 1
daemon/logs.go

@@ -173,7 +173,7 @@ func (daemon *Daemon) getLogger(container *container.Container) (l logger.Logger
 	return
 }
 
-// mergeLogConfig merges the daemon log config to the container's log config if the container's log driver is not specified.
+// mergeAndVerifyLogConfig merges the daemon log config to the container's log config if the container's log driver is not specified.
 func (daemon *Daemon) mergeAndVerifyLogConfig(cfg *containertypes.LogConfig) error {
 	if cfg.Type == "" {
 		cfg.Type = daemon.defaultLogConfig.Type

+ 1 - 1
dockerversion/useragent.go

@@ -30,7 +30,7 @@ var (
 	daemonUA     string
 )
 
-// getUserAgentFromContext returns the user-agent to use for requests made by
+// getDaemonUserAgent returns the user-agent to use for requests made by
 // the daemon.
 //
 // It includes;

+ 1 - 1
integration/internal/build/build.go

@@ -27,7 +27,7 @@ func Do(ctx context.Context, t *testing.T, client client.APIClient, buildCtx *fa
 	return img
 }
 
-// GetImageIDFRommBody reads the image ID from the build response body.
+// GetImageIDFromBody reads the image ID from the build response body.
 func GetImageIDFromBody(t *testing.T, body io.Reader) string {
 	var (
 		jm  jsonmessage.JSONMessage