mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
update lint errors
This commit is contained in:
parent
3f417ec6b3
commit
77407ea568
3 changed files with 15 additions and 15 deletions
|
|
@ -2319,12 +2319,12 @@ github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:362.28,391.2
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:391.24,394.4 2 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:391.24,394.4 2 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:397.2,407.14 10 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:397.2,407.14 10 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:411.40,416.2 4 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:411.40,416.2 4 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:419.55,421.21 2 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:419.50,421.21 2 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:421.21,423.3 1 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:421.21,423.3 1 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:424.2,426.8 3 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:424.2,426.21 3 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:430.52,432.21 2 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:430.46,432.21 2 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:432.21,434.3 1 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:432.21,434.3 1 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:435.2,437.8 3 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:435.2,437.22 3 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:441.38,443.26 2 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:441.38,443.26 2 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:443.26,445.3 1 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:443.26,445.3 1 0
|
||||||
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:448.2,453.12 5 0
|
github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:448.2,453.12 5 0
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ func (r *LibpodRuntime) PodStats(ctx context.Context, id string, stream bool) (<
|
||||||
}
|
}
|
||||||
|
|
||||||
// aggregatePodContainerStats collects and aggregates stats from all containers in a pod.
|
// aggregatePodContainerStats collects and aggregates stats from all containers in a pod.
|
||||||
func (r *LibpodRuntime) aggregatePodContainerStats(ctx context.Context, pod *libpod.Pod) (PodStatsEntry, error) {
|
func (r *LibpodRuntime) aggregatePodContainerStats(_ context.Context, pod *libpod.Pod) (PodStatsEntry, error) {
|
||||||
ctrs, err := pod.AllContainers()
|
ctrs, err := pod.AllContainers()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return PodStatsEntry{}, err
|
return PodStatsEntry{}, err
|
||||||
|
|
|
||||||
|
|
@ -411,30 +411,30 @@ func aggregatePodStats(reports []*types.PodStatsReport) PodStatsEntry {
|
||||||
func parsePercentage(s string) float64 {
|
func parsePercentage(s string) float64 {
|
||||||
s = strings.TrimSuffix(strings.TrimSpace(s), "%")
|
s = strings.TrimSuffix(strings.TrimSpace(s), "%")
|
||||||
var val float64
|
var val float64
|
||||||
fmt.Sscanf(s, "%f", &val)
|
_, _ = fmt.Sscanf(s, "%f", &val)
|
||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseMemoryBytes parses memory usage string like "1000000 / 4000000" into usage and limit.
|
// parseMemoryBytes parses memory usage string like "1000000 / 4000000" into usage and limit.
|
||||||
func parseMemoryBytes(s string) (usage, limit uint64) {
|
func parseMemoryBytes(s string) (uint64, uint64) {
|
||||||
parts := strings.Split(s, "/")
|
parts := strings.Split(s, "/")
|
||||||
if len(parts) != 2 {
|
if len(parts) != 2 {
|
||||||
return 0, 0
|
return 0, 0
|
||||||
}
|
}
|
||||||
usage = parseByteValue(strings.TrimSpace(parts[0]))
|
usage := parseByteValue(strings.TrimSpace(parts[0]))
|
||||||
limit = parseByteValue(strings.TrimSpace(parts[1]))
|
limit := parseByteValue(strings.TrimSpace(parts[1]))
|
||||||
return
|
return usage, limit
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseIOBytes parses I/O string like "1.5kB / 2.3kB" into input and output bytes.
|
// parseIOBytes parses I/O string like "1.5kB / 2.3kB" into input and output bytes.
|
||||||
func parseIOBytes(s string) (input, output uint64) {
|
func parseIOBytes(s string) (uint64, uint64) {
|
||||||
parts := strings.Split(s, "/")
|
parts := strings.Split(s, "/")
|
||||||
if len(parts) != 2 {
|
if len(parts) != 2 {
|
||||||
return 0, 0
|
return 0, 0
|
||||||
}
|
}
|
||||||
input = parseByteValue(strings.TrimSpace(parts[0]))
|
input := parseByteValue(strings.TrimSpace(parts[0]))
|
||||||
output = parseByteValue(strings.TrimSpace(parts[1]))
|
output := parseByteValue(strings.TrimSpace(parts[1]))
|
||||||
return
|
return input, output
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseByteValue parses a byte value string with optional unit (e.g., "1.5kB", "10MB", "1000000").
|
// parseByteValue parses a byte value string with optional unit (e.g., "1.5kB", "10MB", "1000000").
|
||||||
|
|
@ -475,7 +475,7 @@ func parseByteValue(s string) uint64 {
|
||||||
func parseUint(s string) uint64 {
|
func parseUint(s string) uint64 {
|
||||||
s = strings.TrimSpace(s)
|
s = strings.TrimSpace(s)
|
||||||
var val uint64
|
var val uint64
|
||||||
fmt.Sscanf(s, "%d", &val)
|
_, _ = fmt.Sscanf(s, "%d", &val)
|
||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue