File tree Expand file tree Collapse file tree 4 files changed +1
-6
lines changed Expand file tree Collapse file tree 4 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import (
25
25
)
26
26
27
27
func main () {
28
- beatcmd .InitBeatCmd ()
29
28
rootCmd := beatcmd .NewRootCommand (beatcmd.BeatParams {
30
29
NewRunner : func (args beatcmd.RunnerParams ) (beatcmd.Runner , error ) {
31
30
return beater .NewRunner (beater.RunnerParams {
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ package beatcmd
19
19
20
20
import (
21
21
cryptorand "crypto/rand"
22
- "flag"
23
22
"log"
24
23
"math"
25
24
"math/big"
@@ -39,7 +38,7 @@ import (
39
38
_ "github.com/elastic/beats/v7/libbeat/publisher/queue/memqueue"
40
39
)
41
40
42
- func InitBeatCmd () {
41
+ func init () {
43
42
initRand ()
44
43
initFlags ()
45
44
}
@@ -63,7 +62,6 @@ func initFlags() {
63
62
}
64
63
}
65
64
66
- flag .Parse ()
67
65
if err := cfgfile .HandleFlags (); err != nil {
68
66
log .Fatal (err )
69
67
}
Original file line number Diff line number Diff line change @@ -275,7 +275,6 @@ func cleanup() error {
275
275
}
276
276
277
277
func Main () error {
278
- beatcmd .InitBeatCmd ()
279
278
rootCmd := newXPackRootCommand (
280
279
func (args beatcmd.RunnerParams ) (beatcmd.Runner , error ) {
281
280
return beater .NewRunner (beater.RunnerParams {
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import (
13
13
)
14
14
15
15
func TestSubCommands (t * testing.T ) {
16
- beatcmd .InitBeatCmd ()
17
16
rootCmd := newXPackRootCommand (func (beatcmd.RunnerParams ) (beatcmd.Runner , error ) {
18
17
panic ("unexpected call" )
19
18
})
You can’t perform that action at this time.
0 commit comments