GithubHelp home page GithubHelp logo

amaurycatelan / gore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from x-motemen/gore

0.0 3.0 0.0 530 KB

Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.

License: MIT License

Go 100.00%

gore's Introduction

gore Build Status

Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.

Screencast

(Screencast taken with cho45/KeyCast)

Usage

gore

After a prompt is shown, enter any Go expressions/statements or commands described below.

To quit the session, type Ctrl-D.

Features

  • Line editing with history

  • Multiline inputs

  • Package importing with completion

  • Evaluates any expressions or statements

  • No "evaluated but not used"

  • Code completion (requires gocode)

  • Pretty printing (pp or spew recommended)

  • Showing documents (requires godoc)

  • Auto-importing

REPL Commands

Some functionalities are provided as colon-commands:

:import <package path>  Import package
:print                  Show current source
:write [<filename>]     Write out current source to file
:doc <expr or pkg>      Show document (requires godoc)
:help                   List commands
:quit                   Quit the session

Installation

gore uses Go toolchains, so I don’t provide binaries.

go get -u github.com/motemen/gore

Make sure $GOPATH/bin is in your $PATH.

Also recommended:

go get -u github.com/nsf/gocode
go get -u github.com/k0kubun/pp # or github.com/davecgh/go-spew
go get -u golang.org/x/tools/cmd/godoc

FAQ/Caveats

  • If you see too many arguments in call to mainScope.LookupParent while installing gore, run go get -u golang.org/x/tools/go/types.

  • gore runs code using go run for each input. If you have entered time-consuming code, gore will run it for each input and take some time.

TODO

  • Undoing input

  • Configuration

  • :write completion

  • Direct editing of code

  • Using external sources

  • API

License

Author

motemen <[email protected]>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.