console, internal: enforce camel case variable names (#19059)

This commit is contained in:
Matthew Halpern 2019-02-14 06:38:07 -08:00 committed by Péter Szilágyi
parent 3ee09ba035
commit e6c06a1da8
3 changed files with 32 additions and 32 deletions

View File

@ -120,10 +120,10 @@ func (c *Console) init(preload []string) error {
consoleObj.Object().Set("error", c.consoleOutput) consoleObj.Object().Set("error", c.consoleOutput)
// Load all the internal utility JavaScript libraries // 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) 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) return fmt.Errorf("web3.js: %v", err)
} }
if _, err := c.jsre.Run("var Web3 = require('web3');"); err != nil { if _, err := c.jsre.Run("var Web3 = require('web3');"); err != nil {

View File

@ -32,8 +32,8 @@ import (
) )
var ( var (
BigNumber_JS = deps.MustAsset("bignumber.js") BignumberJs = deps.MustAsset("bignumber.js")
Web3_JS = deps.MustAsset("web3.js") Web3Js = deps.MustAsset("web3.js")
) )
/* /*

View File

@ -18,23 +18,23 @@
package web3ext package web3ext
var Modules = map[string]string{ var Modules = map[string]string{
"accounting": Accounting_JS, "accounting": AccountingJs,
"admin": Admin_JS, "admin": AdminJs,
"chequebook": Chequebook_JS, "chequebook": ChequebookJs,
"clique": Clique_JS, "clique": CliqueJs,
"ethash": Ethash_JS, "ethash": EthashJs,
"debug": Debug_JS, "debug": DebugJs,
"eth": Eth_JS, "eth": EthJs,
"miner": Miner_JS, "miner": MinerJs,
"net": Net_JS, "net": NetJs,
"personal": Personal_JS, "personal": PersonalJs,
"rpc": RPC_JS, "rpc": RpcJs,
"shh": Shh_JS, "shh": ShhJs,
"swarmfs": SWARMFS_JS, "swarmfs": SwarmfsJs,
"txpool": TxPool_JS, "txpool": TxpoolJs,
} }
const Chequebook_JS = ` const ChequebookJs = `
web3._extend({ web3._extend({
property: 'chequebook', property: 'chequebook',
methods: [ methods: [
@ -65,7 +65,7 @@ web3._extend({
}); });
` `
const Clique_JS = ` const CliqueJs = `
web3._extend({ web3._extend({
property: 'clique', property: 'clique',
methods: [ methods: [
@ -111,7 +111,7 @@ web3._extend({
}); });
` `
const Ethash_JS = ` const EthashJs = `
web3._extend({ web3._extend({
property: 'ethash', property: 'ethash',
methods: [ methods: [
@ -139,7 +139,7 @@ web3._extend({
}); });
` `
const Admin_JS = ` const AdminJs = `
web3._extend({ web3._extend({
property: 'admin', property: 'admin',
methods: [ methods: [
@ -217,7 +217,7 @@ web3._extend({
}); });
` `
const Debug_JS = ` const DebugJs = `
web3._extend({ web3._extend({
property: 'debug', property: 'debug',
methods: [ methods: [
@ -454,7 +454,7 @@ web3._extend({
}); });
` `
const Eth_JS = ` const EthJs = `
web3._extend({ web3._extend({
property: 'eth', property: 'eth',
methods: [ methods: [
@ -524,7 +524,7 @@ web3._extend({
}); });
` `
const Miner_JS = ` const MinerJs = `
web3._extend({ web3._extend({
property: 'miner', property: 'miner',
methods: [ methods: [
@ -569,7 +569,7 @@ web3._extend({
}); });
` `
const Net_JS = ` const NetJs = `
web3._extend({ web3._extend({
property: 'net', property: 'net',
methods: [], methods: [],
@ -582,7 +582,7 @@ web3._extend({
}); });
` `
const Personal_JS = ` const PersonalJs = `
web3._extend({ web3._extend({
property: 'personal', property: 'personal',
methods: [ methods: [
@ -628,7 +628,7 @@ web3._extend({
}) })
` `
const RPC_JS = ` const RpcJs = `
web3._extend({ web3._extend({
property: 'rpc', property: 'rpc',
methods: [], methods: [],
@ -641,7 +641,7 @@ web3._extend({
}); });
` `
const Shh_JS = ` const ShhJs = `
web3._extend({ web3._extend({
property: 'shh', property: 'shh',
methods: [ methods: [
@ -661,7 +661,7 @@ web3._extend({
}); });
` `
const SWARMFS_JS = ` const SwarmfsJs = `
web3._extend({ web3._extend({
property: 'swarmfs', property: 'swarmfs',
methods: methods:
@ -685,7 +685,7 @@ web3._extend({
}); });
` `
const TxPool_JS = ` const TxpoolJs = `
web3._extend({ web3._extend({
property: 'txpool', property: 'txpool',
methods: [], methods: [],
@ -712,7 +712,7 @@ web3._extend({
}); });
` `
const Accounting_JS = ` const AccountingJs = `
web3._extend({ web3._extend({
property: 'accounting', property: 'accounting',
methods: [ methods: [