mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
chore: fix some comments to improve readability
Signed-off-by: zjuzhongwen <zjuzhongwen@outlook.com>
This commit is contained in:
parent
ecf88ebdb3
commit
2c8a7acbeb
4 changed files with 5 additions and 5 deletions
|
|
@ -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 {
|
func NewSpecGeneratorWithRootfs(rootfs string) *SpecGenerator {
|
||||||
csc := ContainerStorageConfig{Rootfs: rootfs}
|
csc := ContainerStorageConfig{Rootfs: rootfs}
|
||||||
return &SpecGenerator{
|
return &SpecGenerator{
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ func IsSystemdSessionValid(uid int) bool {
|
||||||
return true
|
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) {
|
func GetLogindConnection(uid int) (*godbus.Conn, error) {
|
||||||
return dbusAuthConnectionLogind(uid)
|
return dbusAuthConnectionLogind(uid)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -998,7 +998,7 @@ func (s *PodmanSessionIntegration) InspectPodToJSON() define.InspectPodData {
|
||||||
return i[0]
|
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 {
|
func (s *PodmanSessionIntegration) InspectPodArrToJSON() []define.InspectPodData {
|
||||||
var i []define.InspectPodData
|
var i []define.InspectPodData
|
||||||
err := jsoniter.Unmarshal(s.Out.Contents(), &i)
|
err := jsoniter.Unmarshal(s.Out.Contents(), &i)
|
||||||
|
|
|
||||||
|
|
@ -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
|
// 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 {
|
func getPodNameInDaemonSet(d *DaemonSet) Pod {
|
||||||
p := Pod{}
|
p := Pod{}
|
||||||
p.Name = fmt.Sprintf("%s-pod", d.Name)
|
p.Name = fmt.Sprintf("%s-pod", d.Name)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue