From 05e257c22cbdbf689634927557bcab05f2befad0 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Sat, 20 Feb 2016 15:47:25 +0100 Subject: [PATCH] jsre: hide fields with prefix _ when pretty-printing This makes web3 internals like _requestManager invisible. --- jsre/pretty.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsre/pretty.go b/jsre/pretty.go index 8b2b35e8e..cd7fa5232 100644 --- a/jsre/pretty.go +++ b/jsre/pretty.go @@ -177,7 +177,7 @@ func (ctx ppctx) fields(obj *otto.Object) []string { seen = make(map[string]bool) ) add := func(k string) { - if seen[k] || boringKeys[k] { + if seen[k] || boringKeys[k] || strings.HasPrefix(k, "_") { return } seen[k] = true