← 全部工具

lesiw/igo

热度 65 更新于 开发与构建

A fake Go interpreter.

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

igo: A Fake Go Interpreter

This is a hack. It works by appending each line you type to a Go program and rerunning it, then hiding the repeated output.

It is easily defeated by printing a non-deterministic number of lines.

If you got here by searching for a genuine interpreted implementation of the Go spec, you might be looking for [yaegi][yaegi].

For best results, use with [rlwrap][rlwrap].

Install

curl

curl lesiw.io/igo | sh

go install

go install lesiw.io/igo@latest

Usage

usage: igo [FILE]

Append to an existing Go file by passing it in as an argument, e.g. igo main.go.

Run it without any arguments to start from an empty package main.

Type .quit to quit.

Prepend a line with : to send a command to the shell, e.g. :go get github.com/google/go-cmp.

[yaegi]: https://github.com/traefik/yaegi [rlwrap]: https://github.com/hanslub42/rlwrap