From 740c5d4284de1704ffab91bf03967346ae7d29a9 Mon Sep 17 00:00:00 2001 From: luchenhan Date: Tue, 14 Jan 2025 11:36:35 +0800 Subject: [PATCH] docs: fix some function names in comment Signed-off-by: luchenhan --- cmd/ctr/commands/run/run.go | 2 +- contrib/apparmor/template.go | 2 +- contrib/fuzz/content_fuzz_test.go | 2 +- internal/cri/util/util.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/ctr/commands/run/run.go b/cmd/ctr/commands/run/run.go index e104c9577..365f77746 100644 --- a/cmd/ctr/commands/run/run.go +++ b/cmd/ctr/commands/run/run.go @@ -269,7 +269,7 @@ var Command = &cli.Command{ }, } -// buildLabel builds the labels from command line labels and the image labels +// buildLabels builds the labels from command line labels and the image labels func buildLabels(cmdLabels, imageLabels map[string]string) map[string]string { labels := make(map[string]string) for k, v := range imageLabels { diff --git a/contrib/apparmor/template.go b/contrib/apparmor/template.go index 2d8a9a68d..3701c90ed 100644 --- a/contrib/apparmor/template.go +++ b/contrib/apparmor/template.go @@ -165,7 +165,7 @@ func load(path string) error { return nil } -// macrosExists checks if the passed macro exists. +// macroExists checks if the passed macro exists. func macroExists(m string) bool { _, err := os.Stat(path.Join(dir, m)) return err == nil diff --git a/contrib/fuzz/content_fuzz_test.go b/contrib/fuzz/content_fuzz_test.go index 3e18b8c6b..53e73e3ad 100644 --- a/contrib/fuzz/content_fuzz_test.go +++ b/contrib/fuzz/content_fuzz_test.go @@ -68,7 +68,7 @@ func generateBlobs(f *fuzz.ConsumeFuzzer) (map[digest.Digest][]byte, error) { return blobs, nil } -// checkwrite is a wrapper around content.WriteBlob() +// checkWrite is a wrapper around content.WriteBlob() func checkWrite(ctx context.Context, cs content.Store, dgst digest.Digest, p []byte) (digest.Digest, error) { if err := content.WriteBlob(ctx, cs, dgst.String(), bytes.NewReader(p), ocispec.Descriptor{Size: int64(len(p)), Digest: dgst}); err != nil { diff --git a/internal/cri/util/util.go b/internal/cri/util/util.go index e5ca181b1..08c413dd4 100644 --- a/internal/cri/util/util.go +++ b/internal/cri/util/util.go @@ -67,7 +67,7 @@ func GetPassthroughAnnotations(podAnnotations map[string]string, return passthroughAnnotations } -// BuildLabel builds the labels from config to be passed to containerd +// BuildLabels builds the labels from config to be passed to containerd func BuildLabels(configLabels, imageConfigLabels map[string]string, containerType string) map[string]string { labels := make(map[string]string)