Skip to content

Commit b51246f

Browse files
tiaoxizhaniwilltry42
authored andcommitted
chore: make function comments match function names
Signed-off-by: tiaoxizhan <[email protected]>
1 parent 582579d commit b51246f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cmd/util/runtimeLabels.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
l "github.com/k3d-io/k3d/v5/pkg/logger"
2828
)
2929

30-
// validateRuntimeLabelKey validates a given label key is not reserved for internal k3d usage
30+
// ValidateRuntimeLabelKey validates a given label key is not reserved for internal k3d usage
3131
func ValidateRuntimeLabelKey(labelKey string) {
3232
if strings.HasPrefix(labelKey, "k3s.") || strings.HasPrefix(labelKey, "k3d.") || labelKey == "app" {
3333
l.Log().Fatalf("runtime label \"%s\" is reserved for internal usage", labelKey)

pkg/runtimes/docker/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func getContainersByLabel(ctx context.Context, labels map[string]string) ([]type
192192
return containers, nil
193193
}
194194

195-
// getContainer details returns the containerjson with more details
195+
// getContainerDetails returns the containerjson with more details
196196
func getContainerDetails(ctx context.Context, containerID string) (types.ContainerJSON, error) {
197197
// (0) create docker client
198198
docker, err := GetDockerClient()

pkg/util/filter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var (
4949
// Regexp pattern to match node filters
5050
var NodeFilterRegexp = regexp.MustCompile(`^(?P<group>server|servers|agent|agents|loadbalancer|all)(?P<subsetSpec>:(?P<subset>(?P<subsetList>(\d+,?)+)|(?P<subsetRange>\d*-\d*)|(?P<subsetWildcard>\*)))?(?P<suffixSpec>:(?P<suffix>[[:alpha:]]+))?$`)
5151

52-
// FilterNodesBySuffix properly interprets NodeFilters with suffix
52+
// FilterNodesWithSuffix properly interprets NodeFilters with suffix
5353
func FilterNodesWithSuffix(nodes []*k3d.Node, nodefilters []string, allowedSuffices ...string) (map[string][]*k3d.Node, error) {
5454
if len(nodefilters) == 0 || len(nodefilters[0]) == 0 {
5555
return nil, fmt.Errorf("No nodefilters specified")

0 commit comments

Comments
 (0)