Web-based IDE for the Go language

Welcome to godev!

The aim of this project is to develop a premier Go language IDE hosted in a web interface. This was inspired by the way that the godoc tool uses a web UI instead of a traditional GUI.

There are certain advantages of a web UI in this case

  • Remote access through your web browser (no extra install required)
  • OS independent GUI (Go has no standard cross-platform library)
  • Hosted Go development environments

Where possible godev aims to reuse existing tools to provide an integrated experience. Not every tool needs to be installed in order to get a basic editing, navigation and execution environment. This helps to keep the IDE bloat to a minimum as well as promote existing standalone tools. Third party extensions to GoDev can be created and installed easily (more details below).

The Plan

The initial sprint and prototype is complete. Future sprints will focus on improving breadth and depth of functionality.

Areas explored:

  • Edit and Code Navigation
    • Use the Eclipse Orion project as a base
    • http://www.eclipse.org/orion
    • Syntax highlighting
    • File outline
    • Simple content assists
    • Markers for compile errors, todo comments, fixme comments
  • Documentation
    • Go doc integration
  • Build and Compile
    • Use the go build/go install commands to compile the code
    • Create console and markers for specific compile errors
  • Run
    • Run and manage running Go process (output buffer, input, stop)
  • Go test
    • Run a package's go test suite and report back results in a table/tree
  • Contextual content assist
    • Content assists based on the return value of a function call
    • Content assists based on the other functions in the current file and local GOPATH packages

New areas to explore:

  • Git Integration
    • Manage push/pull/commit/add
  • RTC SCM Integration
    • Manage pending changes, check-ins, deliveries

Screenshots

Markers Save your Go file to see markers for compile errors and warnings.

Content Assistance Content assistance when you type '.' or Ctrl+Space

Quick Run Run your program quickly by pressing F8

GoDoc Bring up GoDocs quickly using Ctrl+Shift+G

Tools Menu Bring up extra tools in the tools menu. Plugins can contribute more tools.

Rich Godocs The GoDocs page provides full godocs. Quickly navigate to packages using the search at the top.

Rich Debug The Debug page provides advanced execution, race condition detection and debug (provided by godbg plugin).

Videos

October 2014 Overview

Youtube

Quick Start

Sprint 4 Summary

Sprint 6 Summary

Getting Started

The godev tool requires the Go SDK, which is freely available for download on golang.org

To begin working with Go you first need to set up your GOPATH. This is a directory where all of your source code and binaries live. Pick an empty directory somewhere on your system and set the GOPATH environment variable with the path to this directory. For more details you can read the "How to Write Go Code" guide on golang.org.

Get the source code from the latest release by running go get: "go get github.com/sirnewton01/godev"

Compile and install godev in your GOPATH by running go install: "go install github.com/sirnewton01/godev"

Make sure that $GOPATH/bin is on your system path and type "godev"

Open up your web browser and navigate to http://127.0.0.1:2022 Note that godev is only accessible from your local machine using the "127.0.0.1" address unless you set up Remote Access (more details below). You can begin a new godev project using the "New -> Folder" menu near the top of the screen.

If you have ideas for enhancements or find defects please Raise a Task on JazzHub (account required): https://hub.jazz.net/ccm01/web/projects/sirnewton%20%7C%20godev#action=com.ibm.team.workitem.newWorkItem&type=task&ts=13725284879510

Happy Go hacking!

Remote Access

Godev has remote access capabilities using your web browser and https. Access is controlled using a magic url known only to the person who launches the godev session. First, some setup is required to specify the fully qualified domain name of your system and establish a secure connection.

Generating SSL/TLS keys

Godev uses HTTP over SSL/TLS, otherwise known as https, to encrypt information sent from the remote system and your local web browser. In order to set up the encryption both a certificate and encryption key is needed to establish the encrypted connection. You can use a tool like openssl or use a Go script included in every Go install to generate it.

To run the Go script to generate your certificates you can run the following command (replace / with \ on Windows, myhost.example.com with your fully qualified domain name):

$ go run /path/to/go/install/src/pkg/crypto/tls/generate _ cert.go -ca=true -duration=8760h0m0s -host=myhost.example.com

It is important to secure the certificates and keys with filesystem permissions so that others canot use them to intercept your communications.

$ chmod go-rwx cert.pem key.pem

Setting Environment Variables

Your fully qualified domain name, certificate file and key file are provided to gdbg using the following environment variables:

$ export GOHOST=myhost.example.com $ export GOCERTFILE=/path/to/my/cert.pem $ export GOKEYFILE=/path/to/my/key.pem

These variables can be set in the same place you set your GOPATH and PATH variables so that they are set automatically every time you run the tool.

Mozilla Persona Authentication

Deprecated: Unfortunately, the persona system has been deprecated by Mozilla and has been removed from Orion.

Debugging

You can debug your applications within godev with the godbg application. Go get it so that you can debug inside your godev session.

$ go get github.com/sirnewton01/godbg

Debugging is accessed via the "Debug" section of godev. Pick your package, set the command-line arguments and click on the "Debug" button. Click on the URL to switch to the debugging session.

Content Assist

Godev has an optional integration with the gocode tool to bring rich content assistance to the editor. Go get the latest go code source to activate the integration.

$ go get github.com/nsf/gocode

To activate content assistance you press Ctrl+Space in the editor to bring up a list of suggestions.

Import Management

You can manage your imports with the goimports tool inside the godev editor. Install the tool with the following command:

$ go get code.google.com/p/go.tools/cmd/goimports

In the godev editor type Ctrl-I to add the imports you need and/or remove the unnecessary ones.

Blame

The godev editor has the ability to show blame for each line of source code managed by Git, Mercurial and Jazz SCM. Godev works with the command-line for each type of VCS to present the blame. If you are able to "go get" it then you should have the command-line tool installed on your system.

Extensions

Godev has a number of third party extensions to further enhance the environment. To install an extension you simply "go get" it like any other Go command or library. Run the following command to add the Go Oracle extension to find references, implementers, callers and channel peers of selections in the editor:

$ go get github.com/sirnewton01/godev-oracle

For more information about writing extension check out the design document (https://github.com/sirnewton01/godev/wiki/GoDev-Extensions). The godev-oracle project is itself a relatively simple demonstration of a GoDev extension.

Troubleshooting

Having problems with godev? Try these couple of steps before raising an issue or defect:

  • Try again using a new Firefox or Chrome
  • Clear your browser cache
  • In Firefox: History -> Clear Recent History (pick "Everything", "Cache" and "Offline Website Data")
  • In Chrome: Tools -> Clear Browsing Data (pick "the beginning of time", "Empty the cache")
  • Clear out old godev plugins
  • In the godev top-right menu -> Settings -> Plugins
  • Look for any plugins that have an 'x' action to the right of them
  • Click 'x' to delete each of the the unnecessary plugins
  • Click "Reload all" at the top-right of the page
  • Clear the browser's local storage
  • In Chrome, Ctrl+Shift+J , type localStorage.clear() and press Enter
  • In Firefox, Ctrl+Shift+K , type localStorage.clear() and press Enter
  • Reload your godev browser pages

If you are still having problems after running these steps then please raise either an issue on github or a defect on jazzhub.

Owner
Chris McGee
Tinkerer, Go and Plan 9 enthusiast and plain text technician. Building up my ideal filesystem namespace.
Chris McGee
Comments
  • Mozilla Persona Authentication

    Mozilla Persona Authentication

    How to setup domain?

    When I use GOHOST=XX godev force me to have certificate file and key file.

    Did you miss anything in README to config this?

    Thanks!

  • std packages

    std packages

    why is this necessary? go get -u github.com/sirnewton01/godev go install unicode/utf8: open /usr/local/go/pkg/linux_386/unicode/utf8.a: permission denied go install hash: open /usr/local/go/pkg/linux_386/hash.a: permission denied go install crypto/cipher: open /usr/local/go/pkg/linux_386/crypto/cipher.a: permission denied go install crypto/subtle: open /usr/local/go/pkg/linux_386/crypto/subtle.a: permission denied go install unicode/utf16: open /usr/local/go/pkg/linux_386/unicode/utf16.a: permission denied go install unicode: open /usr/local/go/pkg/linux_386/unicode.a: permission denied

  • Remote Access

    Remote Access

    Hey there,

    This is a really awesome tool, especially it has intellisense. I also notice it supports remotes access, but I do quite understand how to use it, could you give more details?

    BTW, it has account panel in the setting page, does that mean anything?

    Cheers, Joe.

  • github.com cannot be opened !

    github.com cannot be opened !

    Within $GOPATH/src all packages that have sub-directories open just fine. Only github.com seems to have a problem that it brings up below message:

    Use the [+] to create new files and folders. Click a file to start coding.
    

    I renamed github.com to github_com and tried again. Now github_com opens properly just like any other folder without problem.

  • Symlink support in directory pane

    Symlink support in directory pane

    I have a bitbucket repo cloned in one location, while my workspace has a symlink to the clone.

    If I browse to the symlink in GoDev, the left pane shows the symlink as if it's a file. If I click on the symlink, I see a browsable directory in the right pane.

    I'd like to see the left pane act as if the symlink is a folder directly (at least for a symlink that points to a folder). Doable?

  • Run external tools without PATH?

    Run external tools without PATH?

    I usually dont setup my PATH to include the $GOPATH/bin folder. This caused some confusion when I tried to run some of the external tools like godef, because godev only said in the error that I should go get godef. However that did not make it work because it expect that the godef binary is on my PATH but its not.

    The easiest for me would be if it could check for the tools in $GOPATH/bin if not found in PATH. But if that not possible please at least mention it in the in the readme :)

    If you update the readme please also add that you need to go install the tools as well, not just go get them. It is not totally obvious that you need that now (at first I assumed that godev itself would install them after I go getted them)

  • Syntax highlighting gone (and ability to use most external commads, eg gofmt)

    Syntax highlighting gone (and ability to use most external commads, eg gofmt)

    I got godev up and running yesterday and everything worked great.

    I tried to use it again today but all syntax highlighting had gone, as well as the ability to use external commands (apart from blame). This means I cannot use gofmt, oracle, etc.

    See the following picture: godev_issue

  • links under

    links under "Go Test" are not navigable on windows

    On windows, after executing tests via the UI, the resulting link is as below (note the back-slash)

    http://localhost:2022/edit/edit.html#\file\xyz\xyz_test.go,line=12

    The link is not navigable.

  • Keep opened files along the top as tabs

    Keep opened files along the top as tabs

    One thing I miss from standard IDEs is how opened files are still available in a tabbed view, so I can flit among the tabs as needed. It would be nice to have a similar functionality added to godev.

  • Proposal: additional

    Proposal: additional "stupid" word completion

    I would like also to suggest, if you could consider, adding a "stupid" word completion, based on all words occurring in a file. I longed for such when writing "top-down" code, i.e. first writing high level function with names of not-yet-existant low-level functions, and then trying to fill them with body. When I then tried to write function prototypes, I could not use completion, and had to either rewrite from memory, or search for the callsite and only then be able to copy&paste.

    Thanks!

  • Integrate kill into debug

    Integrate kill into debug

    Would it be possible to add ability to kill a process that was started from the debug panel? I just started developing a web app and have to manually kill the process from command line.

  • godoc pulling all resources

    godoc pulling all resources

    godoc seems to be using all the resources it can get. I've found the issue and it's in doc.go:

    cmd := exec.Command("godoc", "-http=127.0.0.1:"+godocPortStr, "-index=true", "templates="+godoc_templates_dir)

    to:

    cmd := exec.Command("godoc", "-http=127.0.0.1:"+godocPortStr, "-index=true", "-maxresu lts=0","-templates="+godoc_templates_dir)

    basically, adding -maxresults=0 makesit play nice.

  • Error Install Godev

    Error Install Godev

    go get -u github.com/sirnewton01/godbg

    warning: code.google.com is shutting down; import path code.google.com/p/go.net/websocket will stop working

    go get code.google.com/p/go.tools/cmd/goimports warning: code.google.com is shutting down; import path code.google.com/p/go.tools/cmd/goimports will stop working

  • Add gorename tool

    Add gorename tool

    This is a suggestion to provide access to the new gorename tool. See announcement here:

    https://groups.google.com/d/msg/golang-nuts/96hGPXYfqsM/WreOUy9qOT4J
    

    Gorename is a tool for type-safe renaming of identifiers in Go source code.

  • Creating a new project does not succeed nor returns an error

    Creating a new project does not succeed nor returns an error

    When I attempt to create a project it seems like creation fails silently. Nothing suggests either success or failure. Watching the debug output on stdout does not hint at anything going wrong either. This is on OSX Mavericks, built with go 1.3.

  • lost position when jumping between files

    lost position when jumping between files

    One trouble which bugged me most when using godev, was that when I jumped from file to file (e.g. "jump to definition", or searching for some function name, etc), especially just for a moment, which I do quite much, then after coming back to the original file, each time I had to scroll again from the beginning and hunt for the position where I was last editing.

    In this workflow, there's also trouble with having to save the file each time, even if the changes are just "in progress" and not worth saving; but IIRC, I worked around this by enabling autosave feature.

    • One possible solution I imagine to fix annoyances in my workflow would be if there was a "Navigate Back/Navigate Forward" feature like in the desktop Eclipse IDE.
    • Other one that could mostly solve my problem would be if there was "bookmarks" feature and keyboard shortcut, for marking lines in files and quickly jumping between them ("next"/"previous"-style); disadvantages here are: that it requires interaction and thus can be accidentally forgotten; also that it is often some line near editing place which is marked (since previous jumps - I know that from using such feature in other editors), and thus requires some movement keystrokes after jumping back to reposition on correct line. There's however an advantage too, that it is more permanent than "Navigate back/forward" and allows for marking more important navigation points.
    • One more partial solution which would often mitigate the problem would be if multiple files could be opened at once (with position remembered), or even if it was that just the position in each filename was remembered. This would help when jumping between files, but would not when jumping inside a single big file, or when jumping to other file later led back to jumping to other function in original file.

    I'd be very grateful if some feature to mitigate my problems was implemented in godev, it would much improve my workflow with it! It's been my main pain point when I last tried. That said, the tool is very impressive already, and balancing near the edge of becoming my favourite for Go development. Big thanks!

Related tags
Eclipse IDE for the Go programming language:
Eclipse IDE for the Go programming language:

Project website: http://goclipse.github.io/ As of 2017, Goclipse is no longer actively maintained, see this blog post for more information. If you are

Dec 20, 2022
gide is an IDE framework in pure Go, using the GoGi gui. It extensively adopts emacs keybindings.
gide is an IDE framework in pure Go, using the GoGi gui.  It extensively adopts emacs keybindings.

Gide Gide is a flexible IDE (integrated development environment) framework in pure Go, using the GoGi GUI (for which it serves as a continuous testing

Jan 8, 2023
A Golang plugin collection for SublimeText 3, providing code completion and other IDE-like features.

GoSublime Intro GoSublime is an IDE-like plugin for Sublime Text 3 mainly, but not limited to, providing integration for most of your Go/Golang develo

Jan 4, 2023
The Fyne IDE

DEFyne This repo contains the work-in-progress Fyne IDE. Features Embedded terminal TODO Various types of editor Syntax highlighting Standard run/test

Dec 20, 2022
A Go language server.

A Go Language Server based on the Go Extension for Visual Studio Code Wraps the VSCode Go extension from Microsoft into a language server, such that i

Dec 6, 2022
Emacs mode for the Go programming language

This is go-mode, the Emacs mode for editing Go code. It is a complete rewrite of the go-mode that shipped with Go 1.0.3 and before, and was part of Go

Dec 24, 2022
An autocompletion daemon for the Go programming language
An autocompletion daemon for the Go programming language

An autocompletion daemon for the Go programming language VERY IMPORTANT: this project is not maintained anymore, look for alternatives or forks if you

Jan 7, 2023
Delve is a debugger for the Go programming language.
Delve is a debugger for the Go programming language.

The GitHub issue tracker is for bugs only. Please use the developer mailing list for any feature proposals and discussions. About Delve Installation L

Dec 29, 2022
A modern and intuitive terminal-based text editor
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals.

Dec 30, 2022
A terminal based game that teaches you how to use Vim.
A terminal based game that teaches you how to use Vim.

VimMan Learn how to use Vim in its natural environment, the Terminal! About VimMan is terminal program that's a semi editor and a semi game. The purpo

Dec 5, 2022
golab: go local application builder - a web-based golang ide
golab: go local application builder - a web-based golang ide

golab golab was a Go IDE for Linux. This project is no longer maintained and might not build due to chganges in dependency projects. The author (mb0)

Aug 16, 2022
Web based, Go IDE.
Web based, Go IDE.

Strukture IDE Beta II Go lang IDE. Built with GopherSauce About project IDE runs as a server and is accessed via web browser. Being a web server, the

Nov 28, 2022
Eclipse IDE for the Go programming language:
Eclipse IDE for the Go programming language:

Project website: http://goclipse.github.io/ As of 2017, Goclipse is no longer actively maintained, see this blog post for more information. If you are

Dec 20, 2022
LiteIDE is a simple, open source, cross-platform Go IDE.
LiteIDE is a simple, open source, cross-platform Go IDE.

LiteIDE X Introduction LiteIDE is a simple, open source, cross-platform Go IDE. Version: X37.3 (support Go modules) Author: visualfc Features Core fea

Jan 5, 2023
gide is an IDE framework in pure Go, using the GoGi gui. It extensively adopts emacs keybindings.
gide is an IDE framework in pure Go, using the GoGi gui.  It extensively adopts emacs keybindings.

Gide Gide is a flexible IDE (integrated development environment) framework in pure Go, using the GoGi GUI (for which it serves as a continuous testing

Jan 8, 2023
A Golang plugin collection for SublimeText 3, providing code completion and other IDE-like features.

GoSublime Intro GoSublime is an IDE-like plugin for Sublime Text 3 mainly, but not limited to, providing integration for most of your Go/Golang develo

Jan 4, 2023
The in-browser IDE for Go

Go Wasm Go Wasm is a Go development environment with the essentials to write and run code entirely within the browser, using the power of WebAssembly

Dec 19, 2022
A tool that helps you write code in your favorite IDE: your word processor!
A tool that helps you write code in your favorite IDE: your word processor!

WordIDE Have you ever wondered: How would it feel like to write code in a word processor? Me neither. But after months minutes of planning, I present

Jul 21, 2022
Lens - The Kubernetes IDE
Lens - The Kubernetes IDE

Lens - The Kubernetes IDE ("Lens IDE") is a distribution of the OpenLens repository with Team Lens specific customizations released under a traditional EULA.

Dec 31, 2022
Go Wasm is a in-browser IDE for Go

Go Wasm Go Wasm is a Go development environment with the essentials to write and run code entirely within the browser, using the power of WebAssembly

Jan 8, 2023