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)
// 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 {

View File

@ -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")
)
/*

View File

@ -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: [