chore: fix some comments to improve readability

Signed-off-by: zjuzhongwen <zjuzhongwen@outlook.com>
This commit is contained in:
zjuzhongwen
2026-07-19 22:18:33 +08:00
parent ecf88ebdb3
commit 2c8a7acbeb
4 changed files with 5 additions and 5 deletions

View File

@@ -699,7 +699,7 @@ func NewSpecGenerator(arg string, rootfs bool) *SpecGenerator {
}
}
// NewSpecGenerator returns a SpecGenerator struct given one of two mandatory inputs
// NewSpecGeneratorWithRootfs returns a SpecGenerator configured with the given root filesystem.
func NewSpecGeneratorWithRootfs(rootfs string) *SpecGenerator {
csc := ContainerStorageConfig{Rootfs: rootfs}
return &SpecGenerator{

View File

@@ -84,7 +84,7 @@ func IsSystemdSessionValid(uid int) bool {
return true
}
// GetDbusConnection returns a user connection to D-BUS
// GetLogindConnection returns a system D-Bus connection authenticated as the given UID.
func GetLogindConnection(uid int) (*godbus.Conn, error) {
return dbusAuthConnectionLogind(uid)
}

View File

@@ -998,7 +998,7 @@ func (s *PodmanSessionIntegration) InspectPodToJSON() define.InspectPodData {
return i[0]
}
// InspectPodToJSON takes the sessions output from an inspect and returns json
// InspectPodArrToJSON takes the session's inspect output and returns JSON-decoded pod data.
func (s *PodmanSessionIntegration) InspectPodArrToJSON() []define.InspectPodData {
var i []define.InspectPodData
err := jsoniter.Unmarshal(s.Out.Contents(), &i)

View File

@@ -1896,9 +1896,9 @@ func withReplicas(replicas int32) deploymentOption {
}
}
// getPodNameInDeployment returns the Pod object
// getPodNameInDaemonSet returns the Pod object
// with just its name set, so that it can be passed around
// and into getCtrNameInPod for ease of testing
// and into getCtrNameInPod for ease of testing.
func getPodNameInDaemonSet(d *DaemonSet) Pod {
p := Pod{}
p.Name = fmt.Sprintf("%s-pod", d.Name)