| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Mon, 22 Dec 2025 13:22:57 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100114061255
location: https://web.archive.org/web/20100114061255/https://github.com/vito/go-repl
server-timing: captures_list;dur=1.011274, exclusion.robots;dur=0.067392, exclusion.robots.policy;dur=0.049446, esindex;dur=0.016367, cdx.remote;dur=358.873913, LoadShardBlock;dur=446.871787, PetaboxLoader3.datanode;dur=84.829208, PetaboxLoader3.resolve;dur=100.701865
x-app-server: wwwb-app213-dc8
x-ts: 302
x-tr: 853
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app213; 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 13:22:57 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Thu, 14 Jan 2010 06:12:55 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "4b5004c452b44d6dc9811d3a6867e840"
x-archive-orig-x-runtime: 142ms
x-archive-orig-content-length: 20612
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: Thu, 14 Jan 2010 06:12:55 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: 51_13_20100114050855_crawl102-c/51_13_20100114061118_crawl101.arc.gz
server-timing: captures_list;dur=0.466444, exclusion.robots;dur=0.017999, exclusion.robots.policy;dur=0.008420, esindex;dur=0.007943, cdx.remote;dur=5.622839, LoadShardBlock;dur=112.704850, PetaboxLoader3.datanode;dur=86.046450, PetaboxLoader3.resolve;dur=78.020578, load_resource;dur=71.494459
x-app-server: wwwb-app213-dc8
x-ts: 200
x-tr: 245
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 service is courtesy of Pledgie.
vito / go-repl
- Source
- Commits
- Network (1)
- Issues (1)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
-
Branches (1)
- master ✓
- Tags (0)
Sending Request…
Enable Donations
Pledgie Donations
Once activated, we'll place the following badge in your repository's detail box:
A Go REPL. Builds up a source .go file over time, compiles it for output. — Read more
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!
