From 436acb4f752b6d16a9ae76447eed02827601d61f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 12 Apr 2017 14:27:34 +0300 Subject: cmd/rlpdump: support dumping only the first entity --- cmd/rlpdump/main.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd') diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go index 10eea1fde..7d328e59b 100644 --- a/cmd/rlpdump/main.go +++ b/cmd/rlpdump/main.go @@ -32,6 +32,7 @@ import ( var ( hexMode = flag.String("hex", "", "dump given hex data") noASCII = flag.Bool("noascii", false, "don't print ASCII strings readably") + single = flag.Bool("single", false, "print only the first element, discard the rest") ) func init() { @@ -82,6 +83,9 @@ func main() { break } fmt.Println() + if *single { + break + } } } -- cgit v1.2.3