aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/cmd.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2014-06-27 01:41:36 +0800
committerzelig <viktor.tron@gmail.com>2014-06-27 01:48:08 +0800
commitae5ace16190d48bfe7a0364fdb0b51644518ec42 (patch)
treee676f9b43b874a13fb47f642a27bfce02e425eff /ethereum/cmd.go
parent648c418fcd7a88fc48032c55c2dba87f6bdad8c7 (diff)
downloaddexon-ae5ace16190d48bfe7a0364fdb0b51644518ec42.tar.gz
dexon-ae5ace16190d48bfe7a0364fdb0b51644518ec42.tar.zst
dexon-ae5ace16190d48bfe7a0364fdb0b51644518ec42.zip
go fmt
Diffstat (limited to 'ethereum/cmd.go')
-rw-r--r--ethereum/cmd.go46
1 files changed, 23 insertions, 23 deletions
diff --git a/ethereum/cmd.go b/ethereum/cmd.go
index 2dfd54666..08147824d 100644
--- a/ethereum/cmd.go
+++ b/ethereum/cmd.go
@@ -1,32 +1,32 @@
package main
import (
- "github.com/ethereum/eth-go"
- "github.com/ethereum/go-ethereum/utils"
- "os"
- "io/ioutil"
+ "github.com/ethereum/eth-go"
+ "github.com/ethereum/go-ethereum/utils"
+ "io/ioutil"
+ "os"
)
func InitJsConsole(ethereum *eth.Ethereum) {
- repl := NewJSRepl(ethereum)
- go repl.Start()
- utils.RegisterInterrupt(func(os.Signal) {
- repl.Stop()
- })
+ repl := NewJSRepl(ethereum)
+ go repl.Start()
+ utils.RegisterInterrupt(func(os.Signal) {
+ repl.Stop()
+ })
}
-func ExecJsFile (ethereum *eth.Ethereum, InputFile string) {
- file, err := os.Open(InputFile)
- if err != nil {
- logger.Fatalln(err)
- }
- content, err := ioutil.ReadAll(file)
- if err != nil {
- logger.Fatalln(err)
- }
- re := NewJSRE(ethereum)
- utils.RegisterInterrupt(func(os.Signal) {
- re.Stop()
- })
- re.Run(string(content))
+func ExecJsFile(ethereum *eth.Ethereum, InputFile string) {
+ file, err := os.Open(InputFile)
+ if err != nil {
+ logger.Fatalln(err)
+ }
+ content, err := ioutil.ReadAll(file)
+ if err != nil {
+ logger.Fatalln(err)
+ }
+ re := NewJSRE(ethereum)
+ utils.RegisterInterrupt(func(os.Signal) {
+ re.Stop()
+ })
+ re.Run(string(content))
}