aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-04-12 23:57:37 +0800
committerGitHub <noreply@github.com>2017-04-12 23:57:37 +0800
commit43671067fb453a1ed798bcc3d8016710460f2bdf (patch)
tree9a6d99d1c43738f8907f6a3347dd8ed0293ca997
parent30d706c35e16305e2e3ec0eb6a6bdd6aba50d9d2 (diff)
parent436acb4f752b6d16a9ae76447eed02827601d61f (diff)
downloaddexon-43671067fb453a1ed798bcc3d8016710460f2bdf.tar
dexon-43671067fb453a1ed798bcc3d8016710460f2bdf.tar.gz
dexon-43671067fb453a1ed798bcc3d8016710460f2bdf.tar.bz2
dexon-43671067fb453a1ed798bcc3d8016710460f2bdf.tar.lz
dexon-43671067fb453a1ed798bcc3d8016710460f2bdf.tar.xz
dexon-43671067fb453a1ed798bcc3d8016710460f2bdf.tar.zst
dexon-43671067fb453a1ed798bcc3d8016710460f2bdf.zip
Merge pull request #14320 from karalabe/rlpdump-single-flag
cmd/rlpdump: support dumping only the first entity
-rw-r--r--cmd/rlpdump/main.go4
1 files changed, 4 insertions, 0 deletions
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
+ }
}
}