chore: Fix function names in comments (#16231)
Signed-off-by: longxiangqiao <longxiangqiao@qq.com>
This commit is contained in:
parent
9cff0ceebe
commit
e8b84ce6d9
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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}
|
||||||
|
|
|
||||||
|
|
@ -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}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue