Skip to content

Commit e6c06a1

Browse files
Matthalp-zzkaralabe
authored andcommitted
console, internal: enforce camel case variable names (#19059)
1 parent 3ee09ba commit e6c06a1

3 files changed

Lines changed: 32 additions & 32 deletions

File tree

‎console/console.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ func (c *Console) init(preload []string) error {
120120
consoleObj.Object().Set("error", c.consoleOutput)
121121

122122
// Load all the internal utility JavaScript libraries
123-
if err := c.jsre.Compile("bignumber.js", jsre.BigNumber_JS); err != nil {
123+
if err := c.jsre.Compile("bignumber.js", jsre.BignumberJs); err != nil {
124124
return fmt.Errorf("bignumber.js: %v", err)
125125
}
126-
if err := c.jsre.Compile("web3.js", jsre.Web3_JS); err != nil {
126+
if err := c.jsre.Compile("web3.js", jsre.Web3Js); err != nil {
127127
return fmt.Errorf("web3.js: %v", err)
128128
}
129129
if _, err := c.jsre.Run("var Web3 = require('web3');"); err != nil {

‎internal/jsre/jsre.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ import (
3232
)
3333

3434
var (
35-
BigNumber_JS = deps.MustAsset("bignumber.js")
36-
Web3_JS = deps.MustAsset("web3.js")
35+
BignumberJs = deps.MustAsset("bignumber.js")
36+
Web3Js = deps.MustAsset("web3.js")
3737
)
3838

3939
/*

‎internal/web3ext/web3ext.go‎

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818
package web3ext
1919

2020
var Modules = map[string]string{
21-
"accounting": Accounting_JS,
22-
"admin": Admin_JS,
23-
"chequebook": Chequebook_JS,
24-
"clique": Clique_JS,
25-
"ethash": Ethash_JS,
26-
"debug": Debug_JS,
27-
"eth": Eth_JS,
28-
"miner": Miner_JS,
29-
"net": Net_JS,
30-
"personal": Personal_JS,
31-
"rpc": RPC_JS,
32-
"shh": Shh_JS,
33-
"swarmfs": SWARMFS_JS,
34-
"txpool": TxPool_JS,
21+
"accounting": AccountingJs,
22+
"admin": AdminJs,
23+
"chequebook": ChequebookJs,
24+
"clique": CliqueJs,
25+
"ethash": EthashJs,
26+
"debug": DebugJs,
27+
"eth": EthJs,
28+
"miner": MinerJs,
29+
"net": NetJs,
30+
"personal": PersonalJs,
31+
"rpc": RpcJs,
32+
"shh": ShhJs,
33+
"swarmfs": SwarmfsJs,
34+
"txpool": TxpoolJs,
3535
}
3636

37-
const Chequebook_JS = `
37+
const ChequebookJs = `
3838
web3._extend({
3939
property: 'chequebook',
4040
methods: [
@@ -65,7 +65,7 @@ web3._extend({
6565
});
6666
`
6767

68-
const Clique_JS = `
68+
const CliqueJs = `
6969
web3._extend({
7070
property: 'clique',
7171
methods: [
@@ -111,7 +111,7 @@ web3._extend({
111111
});
112112
`
113113

114-
const Ethash_JS = `
114+
const EthashJs = `
115115
web3._extend({
116116
property: 'ethash',
117117
methods: [
@@ -139,7 +139,7 @@ web3._extend({
139139
});
140140
`
141141

142-
const Admin_JS = `
142+
const AdminJs = `
143143
web3._extend({
144144
property: 'admin',
145145
methods: [
@@ -217,7 +217,7 @@ web3._extend({
217217
});
218218
`
219219

220-
const Debug_JS = `
220+
const DebugJs = `
221221
web3._extend({
222222
property: 'debug',
223223
methods: [
@@ -454,7 +454,7 @@ web3._extend({
454454
});
455455
`
456456

457-
const Eth_JS = `
457+
const EthJs = `
458458
web3._extend({
459459
property: 'eth',
460460
methods: [
@@ -524,7 +524,7 @@ web3._extend({
524524
});
525525
`
526526

527-
const Miner_JS = `
527+
const MinerJs = `
528528
web3._extend({
529529
property: 'miner',
530530
methods: [
@@ -569,7 +569,7 @@ web3._extend({
569569
});
570570
`
571571

572-
const Net_JS = `
572+
const NetJs = `
573573
web3._extend({
574574
property: 'net',
575575
methods: [],
@@ -582,7 +582,7 @@ web3._extend({
582582
});
583583
`
584584

585-
const Personal_JS = `
585+
const PersonalJs = `
586586
web3._extend({
587587
property: 'personal',
588588
methods: [
@@ -628,7 +628,7 @@ web3._extend({
628628
})
629629
`
630630

631-
const RPC_JS = `
631+
const RpcJs = `
632632
web3._extend({
633633
property: 'rpc',
634634
methods: [],
@@ -641,7 +641,7 @@ web3._extend({
641641
});
642642
`
643643

644-
const Shh_JS = `
644+
const ShhJs = `
645645
web3._extend({
646646
property: 'shh',
647647
methods: [
@@ -661,7 +661,7 @@ web3._extend({
661661
});
662662
`
663663

664-
const SWARMFS_JS = `
664+
const SwarmfsJs = `
665665
web3._extend({
666666
property: 'swarmfs',
667667
methods:
@@ -685,7 +685,7 @@ web3._extend({
685685
});
686686
`
687687

688-
const TxPool_JS = `
688+
const TxpoolJs = `
689689
web3._extend({
690690
property: 'txpool',
691691
methods: [],
@@ -712,7 +712,7 @@ web3._extend({
712712
});
713713
`
714714

715-
const Accounting_JS = `
715+
const AccountingJs = `
716716
web3._extend({
717717
property: 'accounting',
718718
methods: [

0 commit comments

Comments
 (0)