Skip to content

Commit

Permalink
return error if wrong proto type was given or loading was not possible
Browse files Browse the repository at this point in the history
  • Loading branch information
birdayz committed Mar 26, 2020
1 parent 7925564 commit 71d26b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/kaf/produce.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ var produceCmd = &cobra.Command{
}

data = pb
} else {
errorExit("Failed to load payload proto type")
}
}

Expand All @@ -86,7 +88,10 @@ var produceCmd = &cobra.Command{
}

key = sarama.ByteEncoder(pb)
} else {
errorExit("Failed to load key proto type")
}

}

var ts time.Time
Expand All @@ -110,7 +115,6 @@ var produceCmd = &cobra.Command{
}

fmt.Printf("Sent record to partition %v at offset %v.\n", partition, offset)

}

},
Expand Down

0 comments on commit 71d26b3

Please sign in to comment.