lab

package module
Version: v0.0.0-...-0f24718 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2016 License: BSD-2-Clause Imports: 9 Imported by: 8

README

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) does use neovim and is quite happy with it, while missing the convenient auto install and test facilities. The ot (operation transformation) package is worth a look and a good start for any collaborative text editing project, there is also a utf-8 based version with js client that can be shared.

golab screenshot

Install

Requires Linux and Go 1.1.

go get github.com/mb0/lab/golab
echo 'yay! magic!'

Basic Usage

golab watches all files under your goroot and gopath (go help gopath). It automatically installs and tests a list of packages specified by the -work flag and prints colored reports to stdout.

Flag -work specifies a path list to the packages you are working on. Multiple paths can be seperated by a colon :. The default ./... uses the current directory and all it child packages.

Example:

cd $GOPATH/src/github.com/mb0
golab -work=../garyburd/go-websocket/websocket:./lab/...

Html5 UI

golab -http starts a web interface for reports and collaborative editing of text files.

Flag -addr=localhost:8910 specifies the http address.

Example:

cd $GOPATH/src
golab -http -addr=:80 -work=github.com/mb0/lab/...

Features:

  • Report view for go errors and test failures with links to sources.
  • Ace editor with gentle highlights and error markers for go, js and css.
  • Document collaboration with operational transformation.
  • External filesystem changes to open documents are merged.
  • godoc Ctrl+Alt+Click on imports in go source files opens the doc view.
  • gofmt Ctrl+Shift+F changes the document (does not save to disk)
  • gocode Ctrl+Space shows gocode completion proposals if installed.

I recommend using the Chrome browser, because the visual feedback seems faster than other browsers.

Feedback

Yes please!

License

golab is BSD licensed, Copyright (c) 2013 Martin Schnabel

Server code attributions

  • Go (c) The Go Authors (BSD License)
  • go-websocket (c) Gary Burd (Apache License 2.0)

Client code and asset attributions

  • require.js (c) The Dojo Foundation (BSD/MIT License)
  • json2.js by Douglas Crockford (public domain)
  • Underscore (c) Jeremy Ashkenas (MIT License)
  • Zepto (c) Thomas Fuchs (MIT License)
  • Backbone (c) Jeremy Ashkenas (MIT License)
  • Ace (c) Ajax.org B.V. (BSD License)
  • Font Awesome by Dave Gandy (SIL, MIT and CC BY 3.0 License)
  • Qunit (c) jQuery Foundation and others (MIT License)

Recycled code attribution // was easier than adapting to golab

  • ot.js (c) Tim Baumann (MIT License)

Documentation

Overview

Package lab provides a global module register.

Index

Constants

This section is empty.

Variables

Conf is special flag set that can be loaded via LoadConf in three passes.

Functions

func LoadConf

func LoadConf()

LoadConf loads the Conf flag set values in three passes on first invocation. The first pass will parse the arguments to populate the -conf flag. The second pass loads the file specified by the -conf flag. The third pass overrides all flags specifed by program arguments.

func Register

func Register(name string, mod Module)

Register registers a module by name. It must be called before the lab is started.

func Start

func Start()

Start locks the lab and initializes and runs all modules.

Types

type Initer

type Initer interface {
	Init()
}

Initer modules are initialized in registration order on lab start.

type Module

type Module interface{}

Module is a part of your program.

func All

func All() []Module

All returns all registered modules.

func Mod

func Mod(name string) Module

Mod returns a registered module with name or nil.

type Runner

type Runner interface {
	Run()
}

Runner modules are run in a new goroutine on lab start.

Source Files

Directories

Path Synopsis
Command golab starts either a CLI for build and test reports or a webinterface with reports and collaborative editing support.
Command golab starts either a CLI for build and test reports or a webinterface with reports and collaborative editing support.
Package ot provides operational transformation utilities for byte text collaboration.
Package ot provides operational transformation utilities for byte text collaboration.
Package ws implements a workspace for file resources.
Package ws implements a workspace for file resources.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL