chore: Fix function names in comments (#16231)

Signed-off-by: longxiangqiao <longxiangqiao@qq.com>
This commit is contained in:
Long FlyBridge 2024-12-04 01:13:13 +08:00 committed by GitHub
parent 9cff0ceebe
commit e8b84ce6d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -811,7 +811,7 @@ func (a *Agent) startOutputs(
return src, unit, nil return src, unit, nil
} }
// connectOutputs connects to all outputs. // connectOutput connects to all outputs.
func (a *Agent) connectOutput(ctx context.Context, output *models.RunningOutput) error { func (a *Agent) connectOutput(ctx context.Context, output *models.RunningOutput) error {
log.Printf("D! [agent] Attempting connection to [%s]", output.LogName()) log.Printf("D! [agent] Attempting connection to [%s]", output.LogName())
if err := output.Connect(); err != nil { if err := output.Connect(); err != nil {

View File

@ -19,7 +19,7 @@ type Duration time.Duration
// Size is an int64 // Size is an int64
type Size int64 type Size int64
// UnmarshalTOML parses the duration from the TOML config file // UnmarshalText parses the duration from the Text config file
func (d *Duration) UnmarshalText(b []byte) error { func (d *Duration) UnmarshalText(b []byte) error {
// convert to string // convert to string
durStr := string(b) durStr := string(b)

View File

@ -214,7 +214,7 @@ func TestGather(t *testing.T) {
} }
} }
// fackeExecCommand is a helper function that mock // fakeExecCommand is a helper function that mock
// the exec.Command call (and call the test binary) // the exec.Command call (and call the test binary)
func fakeExecCommand(command string, args ...string) *exec.Cmd { func fakeExecCommand(command string, args ...string) *exec.Cmd {
cs := []string{"-test.run=TestHelperProcess", "--", command} cs := []string{"-test.run=TestHelperProcess", "--", command}
@ -536,7 +536,7 @@ func TestGatherV2(t *testing.T) {
} }
} }
// fackeExecCommandV2 is a helper function that mock // fakeExecCommandV2 is a helper function that mock
// the exec.Command call (and call the test binary) // the exec.Command call (and call the test binary)
func fakeExecCommandV2(command string, args ...string) *exec.Cmd { func fakeExecCommandV2(command string, args ...string) *exec.Cmd {
cs := []string{"-test.run=TestHelperProcessV2", "--", command} cs := []string{"-test.run=TestHelperProcessV2", "--", command}

View File

@ -290,7 +290,7 @@ func TestGatherNotRemoveNumbers(t *testing.T) {
} }
} }
// fackeExecCommand is a helper function that mock // fakeExecCommand is a helper function that mock
// the exec.Command call (and call the test binary) // the exec.Command call (and call the test binary)
func fakeExecCommand(command string, args ...string) *exec.Cmd { func fakeExecCommand(command string, args ...string) *exec.Cmd {
cs := []string{"-test.run=TestHelperProcess", "--", command} cs := []string{"-test.run=TestHelperProcess", "--", command}