From e6c06a1da8ea8ecbc644a042ed0aeb95f49ab6ef Mon Sep 17 00:00:00 2001 From: Matthew Halpern Date: Thu, 14 Feb 2019 06:38:07 -0800 Subject: [PATCH] console, internal: enforce camel case variable names (#19059) --- console/console.go | 4 +-- internal/jsre/jsre.go | 4 +-- internal/web3ext/web3ext.go | 56 ++++++++++++++++++------------------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/console/console.go b/console/console.go index 3c397f8006..222ac3b52d 100644 --- a/console/console.go +++ b/console/console.go @@ -120,10 +120,10 @@ func (c *Console) init(preload []string) error { consoleObj.Object().Set("error", c.consoleOutput) // Load all the internal utility JavaScript libraries - if err := c.jsre.Compile("bignumber.js", jsre.BigNumber_JS); err != nil { + if err := c.jsre.Compile("bignumber.js", jsre.BignumberJs); err != nil { return fmt.Errorf("bignumber.js: %v", err) } - if err := c.jsre.Compile("web3.js", jsre.Web3_JS); err != nil { + if err := c.jsre.Compile("web3.js", jsre.Web3Js); err != nil { return fmt.Errorf("web3.js: %v", err) } if _, err := c.jsre.Run("var Web3 = require('web3');"); err != nil { diff --git a/internal/jsre/jsre.go b/internal/jsre/jsre.go index 4c7664f1cc..1b3528a036 100644 --- a/internal/jsre/jsre.go +++ b/internal/jsre/jsre.go @@ -32,8 +32,8 @@ import ( ) var ( - BigNumber_JS = deps.MustAsset("bignumber.js") - Web3_JS = deps.MustAsset("web3.js") + BignumberJs = deps.MustAsset("bignumber.js") + Web3Js = deps.MustAsset("web3.js") ) /* diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index df69d0b94a..e1577fe2f8 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -18,23 +18,23 @@ package web3ext var Modules = map[string]string{ - "accounting": Accounting_JS, - "admin": Admin_JS, - "chequebook": Chequebook_JS, - "clique": Clique_JS, - "ethash": Ethash_JS, - "debug": Debug_JS, - "eth": Eth_JS, - "miner": Miner_JS, - "net": Net_JS, - "personal": Personal_JS, - "rpc": RPC_JS, - "shh": Shh_JS, - "swarmfs": SWARMFS_JS, - "txpool": TxPool_JS, + "accounting": AccountingJs, + "admin": AdminJs, + "chequebook": ChequebookJs, + "clique": CliqueJs, + "ethash": EthashJs, + "debug": DebugJs, + "eth": EthJs, + "miner": MinerJs, + "net": NetJs, + "personal": PersonalJs, + "rpc": RpcJs, + "shh": ShhJs, + "swarmfs": SwarmfsJs, + "txpool": TxpoolJs, } -const Chequebook_JS = ` +const ChequebookJs = ` web3._extend({ property: 'chequebook', methods: [ @@ -65,7 +65,7 @@ web3._extend({ }); ` -const Clique_JS = ` +const CliqueJs = ` web3._extend({ property: 'clique', methods: [ @@ -111,7 +111,7 @@ web3._extend({ }); ` -const Ethash_JS = ` +const EthashJs = ` web3._extend({ property: 'ethash', methods: [ @@ -139,7 +139,7 @@ web3._extend({ }); ` -const Admin_JS = ` +const AdminJs = ` web3._extend({ property: 'admin', methods: [ @@ -217,7 +217,7 @@ web3._extend({ }); ` -const Debug_JS = ` +const DebugJs = ` web3._extend({ property: 'debug', methods: [ @@ -454,7 +454,7 @@ web3._extend({ }); ` -const Eth_JS = ` +const EthJs = ` web3._extend({ property: 'eth', methods: [ @@ -524,7 +524,7 @@ web3._extend({ }); ` -const Miner_JS = ` +const MinerJs = ` web3._extend({ property: 'miner', methods: [ @@ -569,7 +569,7 @@ web3._extend({ }); ` -const Net_JS = ` +const NetJs = ` web3._extend({ property: 'net', methods: [], @@ -582,7 +582,7 @@ web3._extend({ }); ` -const Personal_JS = ` +const PersonalJs = ` web3._extend({ property: 'personal', methods: [ @@ -628,7 +628,7 @@ web3._extend({ }) ` -const RPC_JS = ` +const RpcJs = ` web3._extend({ property: 'rpc', methods: [], @@ -641,7 +641,7 @@ web3._extend({ }); ` -const Shh_JS = ` +const ShhJs = ` web3._extend({ property: 'shh', methods: [ @@ -661,7 +661,7 @@ web3._extend({ }); ` -const SWARMFS_JS = ` +const SwarmfsJs = ` web3._extend({ property: 'swarmfs', methods: @@ -685,7 +685,7 @@ web3._extend({ }); ` -const TxPool_JS = ` +const TxpoolJs = ` web3._extend({ property: 'txpool', methods: [], @@ -712,7 +712,7 @@ web3._extend({ }); ` -const Accounting_JS = ` +const AccountingJs = ` web3._extend({ property: 'accounting', methods: [