Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 610abb6

Browse files
committed
chore: Improve naming
1 parent 03ae4c0 commit 610abb6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cli/agent.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ func workspaceAgent() *cobra.Command {
5757
defer srvClose()
5858
} else {
5959
// If pprof wasn't enabled at startup, allow a
60-
// `kill -USR1 $agent_pid` to start it.
61-
srvClose := agentPPROFStartOnUSR1(cmd.Context(), logger, pprofAddress)
60+
// `kill -USR1 $agent_pid` to start it (on Unix).
61+
srvClose := agentStartPPROFOnUSR1(cmd.Context(), logger, pprofAddress)
6262
defer srvClose()
6363
}
6464

cli/agent_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"cdr.dev/slog"
1010
)
1111

12-
func agentPPROFStartOnUSR1(ctx context.Context, logger slog.Logger, pprofAddress string) (srvClose func()) {
12+
func agentStartPPROFOnUSR1(ctx context.Context, logger slog.Logger, pprofAddress string) (srvClose func()) {
1313
ctx, cancel := context.WithCancel(ctx)
1414

1515
usr1 := make(chan os.Signal, 1)

cli/agent_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"cdr.dev/slog"
1010
)
1111

12-
// agentPPROFStartOnUSR1 is no-op on Windows (no SIGUSR1 signal).
13-
func agentPPROFStartOnUSR1(ctx context.Context, logger slog.Logger, pprofAddress string) (srvClose func()) {
12+
// agentStartPPROFOnUSR1 is no-op on Windows (no SIGUSR1 signal).
13+
func agentStartPPROFOnUSR1(ctx context.Context, logger slog.Logger, pprofAddress string) (srvClose func()) {
1414
return func() {}
1515
}

0 commit comments

Comments
 (0)