chore: fix some minor issues in the comments

Signed-off-by: shandongzhejiang <shandongzhejiang@icloud.com>
pull/1870/head
shandongzhejiang 6 days ago
parent f48b638df7
commit db23986b71

@ -86,7 +86,7 @@ func InfoWithContext(ctx context.Context) (*InfoStat, error) {
ret.KernelArch, err = KernelArch() ret.KernelArch, err = KernelArch()
if err != nil && !errors.Is(err, common.ErrNotImplementedError) { if err != nil && !errors.Is(err, common.ErrNotImplementedError) {
return nil, fmt.Errorf("getting kernel archictecture: %w", err) return nil, fmt.Errorf("getting kernel architecture: %w", err)
} }
ret.VirtualizationSystem, ret.VirtualizationRole, err = VirtualizationWithContext(ctx) ret.VirtualizationSystem, ret.VirtualizationRole, err = VirtualizationWithContext(ctx)

@ -257,7 +257,7 @@ func PlatformInformationWithContext(ctx context.Context) (platform, family, vers
version = getSuseVersion(contents) version = getSuseVersion(contents)
platform = getSusePlatform(contents) platform = getSusePlatform(contents)
} }
// TODO: slackware detecion // TODO: slackware detection
case common.PathExistsWithContents(common.HostEtcWithContext(ctx, "arch-release")): case common.PathExistsWithContents(common.HostEtcWithContext(ctx, "arch-release")):
platform = "arch" platform = "arch"
version = lsb.Release version = lsb.Release

@ -273,7 +273,7 @@ func getIOCountersAll(n []IOCountersStat) []IOCountersStat {
return []IOCountersStat{r} return []IOCountersStat{r}
} }
// NetIOCounters returns network I/O statistics for every network // IOCounters returns network I/O statistics for every network
// interface installed on the system. If pernic argument is false, // interface installed on the system. If pernic argument is false,
// return only sum of all information (which name is 'all'). If true, // return only sum of all information (which name is 'all'). If true,
// every network interface installed on the system is returned // every network interface installed on the system is returned
@ -296,7 +296,7 @@ func ProtoCounters(protocols []string) ([]ProtoCountersStat, error) {
return ProtoCountersWithContext(context.Background(), protocols) return ProtoCountersWithContext(context.Background(), protocols)
} }
// NetFilterCounters returns iptables conntrack statistics // FilterCounters returns iptables conntrack statistics
// the currently in use conntrack count and the max. // the currently in use conntrack count and the max.
// If the file does not exist or is invalid it will return nil. // If the file does not exist or is invalid it will return nil.
func FilterCounters() ([]FilterStat, error) { func FilterCounters() ([]FilterStat, error) {
@ -349,7 +349,7 @@ func ConnectionsPidMax(kind string, pid int32, maxConn int) ([]ConnectionStat, e
// Pids retunres all pids. // Pids retunres all pids.
// Note: this is a copy of process_linux.Pids() // Note: this is a copy of process_linux.Pids()
// FIXME: Import process occures import cycle. // FIXME: Import process occurs import cycle.
// move to common made other platform breaking. Need consider. // move to common made other platform breaking. Need consider.
func Pids() ([]int32, error) { func Pids() ([]int32, error) {
return PidsWithContext(context.Background()) return PidsWithContext(context.Background())

@ -540,7 +540,7 @@ func PidsWithContext(ctx context.Context) ([]int32, error) {
// Note: the following is based off process_linux structs and methods // Note: the following is based off process_linux structs and methods
// we need these to fetch the owner of a process ID // we need these to fetch the owner of a process ID
// FIXME: Import process occures import cycle. // FIXME: Import process occurs import cycle.
// see remarks on pids() // see remarks on pids()
type process struct { type process struct {
Pid int32 `json:"pid"` Pid int32 `json:"pid"`

Loading…
Cancel
Save