Skip to content

Commit

Permalink
cmd: fix parsing --debug flag
Browse files Browse the repository at this point in the history
  • Loading branch information
travisjeffery committed Oct 19, 2017
1 parent 7f71492 commit 8b4c40a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cmd/jocko/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ var (
)

func main() {
cmd := kingpin.MustParse(cli.Parse(os.Args[1:]))

logLevel := simplelog.INFO
if *debugLogs {
logLevel = simplelog.DEBUG
}
logger := simplelog.New(os.Stdout, logLevel, "jocko")

switch kingpin.MustParse(cli.Parse(os.Args[1:])) {
switch cmd {
case brokerCmd.FullCommand():
os.Exit(cmdBrokers(logger))
case createTopicCmd.FullCommand():
Expand Down
4 changes: 3 additions & 1 deletion testutil/mock/raft.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package mock

import "github.com/travisjeffery/jocko"
import (
"github.com/travisjeffery/jocko"
)

type Raft struct {
BootstrapFn func(serf jocko.Serf, serfEventCh <-chan *jocko.ClusterMember, commandCh chan<- jocko.RaftCommand) error
Expand Down

0 comments on commit 8b4c40a

Please sign in to comment.