Skip to content

Commit 4367106

Browse files
authored
Merge pull request #14320 from karalabe/rlpdump-single-flag
cmd/rlpdump: support dumping only the first entity
2 parents 30d706c + 436acb4 commit 4367106

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎cmd/rlpdump/main.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
var (
3333
hexMode = flag.String("hex", "", "dump given hex data")
3434
noASCII = flag.Bool("noascii", false, "don't print ASCII strings readably")
35+
single = flag.Bool("single", false, "print only the first element, discard the rest")
3536
)
3637

3738
func init() {
@@ -82,6 +83,9 @@ func main() {
8283
break
8384
}
8485
fmt.Println()
86+
if *single {
87+
break
88+
}
8589
}
8690
}
8791

0 commit comments

Comments
 (0)