| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Mon, 22 Dec 2025 08:17:05 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20091214120502
location: https://web.archive.org/web/20091214120502/https://github.com/vito/go-repl
server-timing: captures_list;dur=1.129563, exclusion.robots;dur=0.092960, exclusion.robots.policy;dur=0.075493, esindex;dur=0.014040, cdx.remote;dur=28.747771, LoadShardBlock;dur=168.945738, PetaboxLoader3.resolve;dur=44.194695, PetaboxLoader3.datanode;dur=58.040908
x-app-server: wwwb-app28-dc8
x-ts: 302
x-tr: 357
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app28; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Mon, 22 Dec 2025 08:17:06 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Mon, 14 Dec 2009 12:05:01 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "fafb8dc2837bacad7ee18a1e256e2421"
x-archive-orig-x-runtime: 141ms
x-archive-orig-content-length: 22382
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Mon, 14 Dec 2009 12:05:02 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_13_20091214101132_crawl101-c/52_13_20091214120436_crawl101.arc.gz
server-timing: captures_list;dur=1.005945, exclusion.robots;dur=0.041005, exclusion.robots.policy;dur=0.024409, esindex;dur=0.014275, cdx.remote;dur=5.751589, LoadShardBlock;dur=195.559421, PetaboxLoader3.datanode;dur=148.912420, PetaboxLoader3.resolve;dur=79.881156, load_resource;dur=120.127001
x-app-server: wwwb-app28-dc8
x-ts: 200
x-tr: 400
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
vito's go-repl at master - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| Description: | A Go REPL. Builds up a source .go file over time, compiles it for output. edit |
| Homepage: | edit |
| Public Clone URL: |
git://github.com/vito/go-repl.git
Give this clone URL to anyone.
git clone git://github.com/vito/go-repl.git
|
| Your Clone URL: |
Use this clone URL yourself.
git clone git@github.com:vito/go-repl.git
|
go-repl /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Dec 07 14:31:57 -0800 2009 | Readline. [vito] |
| |
Makefile | Mon Dec 07 14:31:57 -0800 2009 | Readline. [vito] |
| |
README.markdown | Mon Dec 07 17:51:20 -0800 2009 | Updated README.markdown. [vito] |
| |
main.go | Mon Dec 07 19:24:44 -0800 2009 | Removed readline dir. [vito] |
README.markdown
A compiling Go REPL.
Builds up Go source as the session goes on, compiles and runs it with every input.
A "!" in front of the input means it's in "unstable" mode, e.g. a package has been imported and isn't used, or errors occur in the source.
Example session:
Welcome to the Go REPL!
Enter '?' for a list of commands.
> ?
Commands:
? help
+ (pkg) import package
- (pkg) remove package
-[dpc] pop last (declaration|package|code)
~ reset
: (...) add persistent code
! inspect source
> a := 6
> b := 7
> println(a * b)
42
> + fmt
! fmt> fmt.Println("Hello, world!")
Hello, world!
! fmt> println("This won't work since fmt doesn't get used.")
Compile error: /tmp/gorepl.go:2: imported and not used: fmt
! fmt> : fmt.Print()
fmt> println("Now it will!")
Now it will!
fmt> func b(a interface{}) { fmt.Printf("You passed: %#v\n", a); }
fmt> b(1)
Compile error: /tmp/gorepl.go:14: cannot call non-function b (type int)
fmt> !
package main
import "fmt"
func b(a interface{}) { fmt.Printf("You passed: %#v\n", a) }
func noop(_ interface{}) {}
func main() {
a := 6;
noop(a);
b := 7;
noop(b);
fmt.Print();
}
fmt> -d
fmt> !
package main
import "fmt"
func noop(_ interface{}) {}
func main() {
a := 6;
noop(a);
b := 7;
noop(b);
fmt.Print();
}
fmt> func dump(a interface{}) { fmt.Printf("You passed: %#v\n", a); }
fmt> dump("Phew, there we go.")
You passed: "Phew, there we go."
fmt> -d
fmt> -c
! fmt> - fmt
> + math
! math> println(math.Pi)
+3.141593e+000
! math> + fmt
! math fmt> fmt.Println(math.Pi)
3.1415927
! math fmt>
This feature is coming soon. Sit tight!







