Skip to content

Commit

Permalink
Merge pull request #1462 from cuishuang/master
Browse files Browse the repository at this point in the history
fix some comments
  • Loading branch information
shirou committed May 13, 2023
2 parents e045dc7 + 9aa4e7a commit 7c610c5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion net/net_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func ConntrackStatsWithContext(ctx context.Context, percpu bool) ([]ConntrackSta
return nil, common.ErrNotImplementedError
}

// NetProtoCounters returns network statistics for the entire system
// ProtoCounters returns network statistics for the entire system
// If protocols is empty then all protocols are returned, otherwise
// just the protocols in the list are returned.
// Not Implemented for Darwin
Expand Down
2 changes: 1 addition & 1 deletion net/net_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func ConntrackStatsWithContext(ctx context.Context, percpu bool) ([]ConntrackSta
return nil, common.ErrNotImplementedError
}

// NetProtoCounters returns network statistics for the entire system
// ProtoCounters returns network statistics for the entire system
// If protocols is empty then all protocols are returned, otherwise
// just the protocols in the list are returned.
// Not Implemented for FreeBSD
Expand Down
2 changes: 1 addition & 1 deletion net/net_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ var netProtocols = []string{
"udplite",
}

// NetProtoCounters returns network statistics for the entire system
// ProtoCounters returns network statistics for the entire system
// If protocols is empty then all protocols are returned, otherwise
// just the protocols in the list are returned.
// Available protocols:
Expand Down
2 changes: 1 addition & 1 deletion net/net_openbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func ConntrackStatsWithContext(ctx context.Context, percpu bool) ([]ConntrackSta
return nil, common.ErrNotImplementedError
}

// NetProtoCounters returns network statistics for the entire system
// ProtoCounters returns network statistics for the entire system
// If protocols is empty then all protocols are returned, otherwise
// just the protocols in the list are returned.
// Not Implemented for OpenBSD
Expand Down
2 changes: 1 addition & 1 deletion net/net_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func ConntrackStatsWithContext(ctx context.Context, percpu bool) ([]ConntrackSta
return nil, common.ErrNotImplementedError
}

// NetProtoCounters returns network statistics for the entire system
// ProtoCounters returns network statistics for the entire system
// If protocols is empty then all protocols are returned, otherwise
// just the protocols in the list are returned.
// Not Implemented for Windows
Expand Down
6 changes: 3 additions & 3 deletions process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func (p *Process) MemoryPercentWithContext(ctx context.Context) (float32, error)
return (100 * float32(used) / float32(total)), nil
}

// CPU_Percent returns how many percent of the CPU time this process uses
// CPUPercent returns how many percent of the CPU time this process uses
func (p *Process) CPUPercent() (float64, error) {
return p.CPUPercentWithContext(context.Background())
}
Expand Down Expand Up @@ -507,7 +507,7 @@ func (p *Process) MemoryInfoEx() (*MemoryInfoExStat, error) {
return p.MemoryInfoExWithContext(context.Background())
}

// PageFaultsInfo returns the process's page fault counters.
// PageFaults returns the process's page fault counters.
func (p *Process) PageFaults() (*PageFaultsStat, error) {
return p.PageFaultsWithContext(context.Background())
}
Expand All @@ -530,7 +530,7 @@ func (p *Process) Connections() ([]net.ConnectionStat, error) {
return p.ConnectionsWithContext(context.Background())
}

// Connections returns a slice of net.ConnectionStat used by the process at most `max`.
// ConnectionsMax returns a slice of net.ConnectionStat used by the process at most `max`.
func (p *Process) ConnectionsMax(max int) ([]net.ConnectionStat, error) {
return p.ConnectionsMaxWithContext(context.Background(), max)
}
Expand Down

0 comments on commit 7c610c5

Please sign in to comment.