Skip to content

Commit 07797b1

Browse files
committed
Make cmdNameWithContext lower-case to avoid exporting it
Signed-off-by: John Blesener <[email protected]>
1 parent e8b2bea commit 07797b1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

process/process_darwin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (p *Process) NameWithContext(ctx context.Context) (string, error) {
7676
name := common.IntToString(k.Proc.P_comm[:])
7777

7878
if len(name) >= 15 {
79-
cmdName, err := p.CmdNameWithContext(ctx)
79+
cmdName, err := p.cmdNameWithContext(ctx)
8080
if err != nil {
8181
return "", err
8282
}
@@ -101,8 +101,8 @@ func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) {
101101
return strings.Join(r[0], " "), err
102102
}
103103

104-
// CmdNameWithContext returns the command name (including spaces) without any arguments
105-
func (p *Process) CmdNameWithContext(ctx context.Context) ([]string, error) {
104+
// cmdNameWithContext returns the command name (including spaces) without any arguments
105+
func (p *Process) cmdNameWithContext(ctx context.Context) ([]string, error) {
106106
r, err := callPsWithContext(ctx, "command", p.Pid, false, true)
107107
if err != nil {
108108
return nil, err

v3/process/process_darwin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (p *Process) NameWithContext(ctx context.Context) (string, error) {
7676
name := common.IntToString(k.Proc.P_comm[:])
7777

7878
if len(name) >= 15 {
79-
cmdName, err := p.CmdNameWithContext(ctx)
79+
cmdName, err := p.cmdNameWithContext(ctx)
8080
if err != nil {
8181
return "", err
8282
}
@@ -101,8 +101,8 @@ func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) {
101101
return strings.Join(r[0], " "), err
102102
}
103103

104-
// CmdNameWithContext returns the command name (including spaces) without any arguments
105-
func (p *Process) CmdNameWithContext(ctx context.Context) ([]string, error) {
104+
// cmdNameWithContext returns the command name (including spaces) without any arguments
105+
func (p *Process) cmdNameWithContext(ctx context.Context) ([]string, error) {
106106
r, err := callPsWithContext(ctx, "command", p.Pid, false, true)
107107
if err != nil {
108108
return nil, err

0 commit comments

Comments
 (0)