diff options
| author | Miki Tebeka <miki.tebeka@gmail.com> | 2015-03-01 05:57:02 +0200 |
|---|---|---|
| committer | Miki Tebeka <miki.tebeka@gmail.com> | 2015-03-01 05:57:02 +0200 |
| commit | 978af8a768be2ed4b0be249a2e87744d0ba8307d (patch) | |
| tree | f10a81f4e874716898af755d9c5b21b85fc606c6 /go/src/step0_repl | |
| parent | 1218ce98a40ef243824fed0efce7160a10fe5f36 (diff) | |
| download | mal-978af8a768be2ed4b0be249a2e87744d0ba8307d.tar.gz mal-978af8a768be2ed4b0be249a2e87744d0ba8307d.zip | |
running "gofmt" on the code
Diffstat (limited to 'go/src/step0_repl')
| -rw-r--r-- | go/src/step0_repl/step0_repl.go | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/go/src/step0_repl/step0_repl.go b/go/src/step0_repl/step0_repl.go index 2e4c47c..644a087 100644 --- a/go/src/step0_repl/step0_repl.go +++ b/go/src/step0_repl/step0_repl.go @@ -1,42 +1,42 @@ package main import ( - "fmt" - "strings" + "fmt" + "strings" ) import ( - "readline" + "readline" ) // read func READ(str string) string { - return str + return str } // eval func EVAL(ast string, env string) string { - return ast + return ast } // print func PRINT(exp string) string { - return exp + return exp } // repl func rep(str string) string { - return PRINT(EVAL(READ(str), "")) + return PRINT(EVAL(READ(str), "")) } func main() { - // repl loop - for { - text, err := readline.Readline("user> ") - text = strings.TrimRight(text, "\n"); - if (err != nil) { - return - } - fmt.Println(rep(text)) - } + // repl loop + for { + text, err := readline.Readline("user> ") + text = strings.TrimRight(text, "\n") + if err != nil { + return + } + fmt.Println(rep(text)) + } } |
