Skip to content
Gomate is a set of TextMate CLI tools for working with Go code
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
assets
cmd/gomate
code
doc
gui
guru
html
notes
outline
rename
test
vendor
.gitignore
.gometalinter.json
CONTRIBUTING.md
LICENSE
Makefile
README.md
envvar.go
go.mod
go.sum
gomate.go
gomate_test.go

README.md

CircleCI

Gomate

Gomate is a set of TextMate CLI tools for working with Go code. Inspired by syscrusher/golang.tmbundle.

Gomate embraces the Unix philosophy adopted by Textmate by utilizing simple CLI tool constructs, such as:

  • Command line arguments to indicate desired action
  • Sourcing environment variable for context of operation
  • Reading input from STDIN and producing desired output on STDOUT

Additionally, Gomate is comprised of many smaller packages with dedicated functions to allow for maximum reuse outside the scope of Textmate. For example, you may want to use the note parsing package and build your own extension to a different tool (e.g. VSCode or VIM).

The modular design also encouraged the development of some dedicated CLI tools:

  • notes - provided a path, will scan recursively and return all godoc notes in all packages
    • Installation: go get github.com/pokstad/gomate/notes/notes
    • Usage: $GOPATH/bin/notes [OPTIONS] PACKAGE_PATH

Install

To get the gomate CLI:

go get -u github.com/pokstad/gomate

Then, install the tool's dependencies:

$GOPATH/bin/gomate install

Usage

Until the bundle install is automated, the following needs to be done manually for each bundle command script:

References

To find references to the symbol under the cursor:

#!/bin/bash
gomate references
  • Output: is set to Show in New Window
    • Format: is HTML

External dependencies: guru

Outline

To generate an outline of the current source code file:

#!/bin/bash
gomate outline
  • Input: is set to Selection
    • Format is set to Text
  • Output: is set to Show in New Window
    • Format: is HTML

Get Documentation

To view HTML documentation of the symbol under the cursor:

#!/bin/bash
gomate getdoc
  • Input: is set to Document
    • Format is set to Text
  • Output: is set to Show in New Window
    • Format: is HTML

External dependencies: gogetdoc

Notes

To view a list of gonotes in the current project:

#!/bin/bash
gomate notes
  • Input: Nothing
  • Ouput: Show in New Window
    • Format: HTML

Rename

To rename an identifier:

#!/bin/bash
gomate rename
  • Input: Nothing
  • Output: Discard

External dependencies: gorename

Roadmap

  • Testing coverage and advanced options for individual test functions (similar to VSCode code lense)
  • Reimplement all features of existing Textmate plugin syscrusher/golang.tmbundle
  • Web service to support rich contexts that allow interactions via AJAX calls
You can’t perform that action at this time.