BBEdit package for Go development

BBEdit package for Go development

Features

  • Full language syntax highlighting
  • Support for code folding func
  • Language defaults
  • Full set of clippings
  • Go tool scripts
  • Completion data for Go standard library

The package is a collection of BBEdit supporting elements for developing Go applications. The Resources directory contains the toolset for supporting the scripting and integration.

Requirements

The following are required for using Go.bbpackage:

  • BBEdit 12.0 or greater
  • Go 1.8 or greater
  • Xcode 6 or greater (particularly the command line tools package)

Install

Download the latest release and install with BBEdit.

Build

The package should be cloned into a working directory. The Makefile will build the sources. The install task will install the package to the correct Application Support directory (either Dropbox, iCloud Drive, or ~/Library).

    git clone https://github.com/ascarter/Go-bbpackage.git
    cd Go-bbpackage
    make install

To update, pull changes and run make install again:

    cd Go-bbpackage
    git pull
    make clean install

Usage

The best way to use BBEdit with a Go project is to simply launch BBEdit from the project root.

    cd ~/Projects/workspace/src/github.com/<username>/<my cool project>
    bbedit .

Go version update

For new versions of Go, the package should generally work. The standard library tags can be updated by using the script stdlib/Update ctags

Owner
Andrew Carter
Principal Software Engineer @microsoft @Azure
Andrew Carter
Comments
  • gotags does not take an --exclude option

    gotags does not take an --exclude option

    I installed gotags v1.3.0 with go get -u github.com/jstemmer/gotags, per the README.

    When I try to build, I get a gotags failure because gotags does not take an --exclude option. The sodlib tags are then dumped to stdout instead of to a file. Here is the output of make:

    $ make clean install
    rm -rf ./Go.bbpackage
    mkdir -p ./Go.bbpackage/Contents
    cp README.md ./Go.bbpackage/.
    cp LICENSE ./Go.bbpackage/.
    cp -R ./src/* ./Go.bbpackage/Contents/.
    mkdir -p ./Go.bbpackage/Contents/Completion\ Data/Go
    gotags -R \
            --exclude="*_test.go" \
            --exclude="/usr/local/go/src/*/*/testdata/*" \
            --exclude="/usr/local/go/src/*/*/testdata/*/*" \
            --exclude="/usr/local/go/src/*/*/testdata/*/*/*" \
            --exclude="/usr/local/go/src/*/*/testdata/*/*/*/*" \
            --exclude="/usr/local/go/src/*/*/testdata/*/*/*/*/*" \
            --exclude="/usr/local/go/src/*/*/testdata/*/*/*/*/*/*" \
            --exclude="/usr/local/go/src/*/*/testdata/*/*/*/*/*/*/*" \
            --exclude="/usr/local/go/src/*/*/*/testdata/*" \
            --exclude="/usr/local/go/src/internal/*/*" \
            --exclude="/usr/local/go/src/internal/*/*/*" \
            --exclude="/usr/local/go/*/internal/*" \
            --exclude="/usr/local/go/*/internal/*/*" \
            --exclude="/usr/local/go/*/internal/*/*/*" \
            --exclude="/usr/local/go/*/internal/*/*/*/*" \
            --exclude="/usr/local/go/*/*/internal/*" \
            --exclude="/usr/local/go/*/*/internal/*/*" \
            --exclude="/usr/local/go/*/*/internal/*/*/*" \
            --exclude="/usr/local/go/*/*/internal/*/*/*/*" \
            -f=./Go.bbpackage/Contents/Completion\ Data/Go/Go\ Standard\ Library.tags --exclude-private=true /usr/local/go/src
    flag provided but not defined: -exclude
    gotags version 1.3.0
    
    Usage: gotags [options] file(s)
    ...
    
  • make install error, BBEdit app bundle ctags dir non-existent

    make install error, BBEdit app bundle ctags dir non-existent

    I get this error:

    $ make install
    mkdir -p ./Go.bbpackage/Contents
    cp README.md ./Go.bbpackage/.
    cp LICENSE ./Go.bbpackage/.
    cp -R ./src/* ./Go.bbpackage/Contents/.
    /Applications/BBEdit.app/Contents/Resources/ctags --recurse --extra=+p+q+r --fields=+a+m+n+S --excmd=number --tag-relative=no --sort=no --exclude=.git --exclude="*_test.go" --exclude="**/testdata/**" --exclude="**/internal/**" -f - /usr/local/Cellar/go/1.12/libexec/src | grep -v -E '^(\w+[.])?[^A-Z]\w+\s+\S+\s\d+[;]["]\s+[cfimstv]' > ./gostdlib.tags
    /bin/sh: /Applications/BBEdit.app/Contents/Resources/ctags: No such file or directory
    make: *** [Go.bbpackage/Contents/Completion Data/Go/Go Standard Library.tags] Error 1
    

    So there's no Resources/ctags in the app bundle. (Should I make the dir?) 🤔 Installing by double-clicking the resulting Go.bbpackage seems to work, though. Not sure if I should copy gostdlib.tags somewhere. 😄

  • Install requires homebrew version of ctags, update readme?

    Install requires homebrew version of ctags, update readme?

    I have go, xcode and bbedit installed, but got this with make install:

    mkdir -p ./Go.bbpackage/Contents
    cp README.md ./Go.bbpackage/.
    cp LICENSE ./Go.bbpackage/.
    cp -R ./src/* ./Go.bbpackage/Contents/.
    ctags --recurse --extra=+p+q+r --fields=+a+m+n+S --excmd=number --tag-relative=no --sort=no --exclude=.git --exclude="*_test.go" --exclude="**/testdata/**" --exclude="**/internal/**" -f - /usr/local/Cellar/go/1.8.3/libexec/src | grep -v -E '^(\w+[.])?[^A-Z]\w+\s+\S+\s\d+[;]["]\s+[cfimstv]' > ./gostdlib.tags
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ctags: illegal option -- -
    usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
    make: *** [Go.bbpackage/Contents/Completion Data/Go/Go Standard Library.tags] Error 1
    

    Running this on the 10.12.6 Beta, Xcode is Version 8.3.2 (8E2002) and Go is go version go1.8.3 darwin/amd64.

    Any suggestions?

  • Go workspace missing

    Go workspace missing

    Whenever I try to use any of the builtin scripts, I get the error "Go workspace missing." I have attempted to traced this back through the shell scripts but can only figure out that _gows_switch() is failing but not why.

  • Relative links in scripts are one level too short

    Relative links in scripts are one level too short

    For scripts installed in:

    ~/Library/Application Support/BBEdit/Packages/Go.bbpackage/Contents/Scripts/go tool
    

    such as goimport.sh:

    PATH="$(dirname "$0")/../Resources":$PATH
    (gorunner goimports -w "$BB_DOC_PATH" 2>&1) | bbr -t "goimports"
    

    doesn't work, but:

    PATH="$(dirname "$0")/../../Resources":$PATH
    (gorunner goimports -w "$BB_DOC_PATH" 2>&1) | bbr -t "goimports"
    

    does. Note the extra ../ in there.

  • Update for BBEdit 12+

    Update for BBEdit 12+

    Overdue update to work with BBEdit 12+. The package likely will not work for versions older than BBEdit 12

    Also add better support for building and release automation.

  • go test script should filter before calling bbresults

    go test script should filter before calling bbresults

    bbresults is a general tool for showing build results in a results browser. The output from go test should run through a filter first before calling bbresults to normalize the output to be appropriate.

    Should:

    • Put notes for failures
    • Fix up file paths to match the package path
  • Bundle Go dependencies

    Bundle Go dependencies

    When building the Go.bbpackage bundle, should build go tools like gotags into the bundle so that it is not fragile when running the helper scripts.

    Steps;

    • Create a workspace
    • go get dependencies (or vendor the go code)
    • go install to resources/bin in the bundle
    • Update scripts to use these binaries instead of trying to figure them out from user's environment

    Downside of this would be that it can't take advantage of any existing tools. Alternative could be to pre-flight when building and inform the user.

    Another option - support a default go workspace (like ~/.go) and add it to the GOPATH if it is found. This would let the user either install there or override the built-in tools

Related tags
Go development plugin for Vim
Go development plugin for Vim

vim-go Features This plugin adds Go language support for Vim, with the following main features: Compile your package with :GoBuild, install it with :G

Jan 7, 2023
Suppress commit to master and development, merge branch to master and development

git-extension masterと名前のつくブランチをマージするのは禁止 masterとdevelopmentブランチに直接commitやmergeするのは禁止 masterブランチを親に新規ブランチを作成するのは禁止 どうしてもmasterやdevelopmentブランチに操作をしたい時は

Nov 8, 2021
Flowgraph package for scalable asynchronous system development

flowgraph Getting Started go get -u github.com/vectaport/flowgraph go test Links Wiki Slides from Minneapolis Golang Meetup, May 22nd 2019 Overview F

Dec 22, 2022
Xendit package usage for development purpose

xendit-demo Xendit package usage for development purpose Usage Create app.env file on your root folder. Add 'READ_KEY_XENDIT' and 'WRITE_KEY_XENDIT' v

Dec 15, 2021
A SDK development package developed in go language and connected to dechain

Platform introduction Dechain go SDK is a SDK development package developed in go language and connected to dechain. This SDK can be provided to go cl

Dec 14, 2021
pREST (PostgreSQL REST), simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new

pREST pREST (PostgreSQL REST), simplify and accelerate development, instant, realtime, high-performance on any Postgres application, existing or new P

Jan 9, 2023
Live reload for Go web development

livedev livedev is a development proxy server for golang that allows live reloading. It supports multiple server configuration. It uses the request's

Jun 17, 2022
Go Micro is a framework for distributed systems development

Go Micro Go Micro is a framework for distributed systems development. Overview Go Micro provides the core requirements for distributed systems develop

Jan 8, 2023
Micro is a platform for cloud native development
Micro is a platform for cloud native development

Micro Overview Micro addresses the key requirements for building services in the cloud. It leverages the microservices architecture pattern and provid

Dec 31, 2022
Conception was an experimental project, looking for ways to make software development more efficient.
Conception was an experimental project, looking for ways to make software development more efficient.

Conception Note: All future development is done in the Go version. Conception is an experimental research project, meant to become a modern IDE/Langua

Jul 21, 2022
Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development

Go bindings for Sciter Check this page for other language bindings (Delphi / D / Go / .NET / Python / Rust). Attention The ownership of project is tra

Dec 23, 2022
Goal is a toolkit for high productivity web development in Go language in the spirit of Revel Framework that is built around the concept of code generation.

Goal Goal is a set of tools for high productivity web development in Go language. Goal, being mostly inspired by Revel Framework and its discussions,

Sep 27, 2021
A 12-factor app logger built for performance and happy development
A 12-factor app logger built for performance and happy development

logxi log XI is a structured 12-factor app logger built for speed and happy development. Simpler. Sane no-configuration defaults out of the box. Faste

Nov 27, 2022
Go Micro is a framework for distributed systems development

Go Micro Go Micro is a framework for distributed systems development. Overview Go Micro provides the core requirements for distributed systems develop

Jan 3, 2023
Go development plugin for Vim
Go development plugin for Vim

vim-go Features This plugin adds Go language support for Vim, with the following main features: Compile your package with :GoBuild, install it with :G

Jan 7, 2023
Goal is a toolkit for high productivity web development in Go language in the spirit of Revel Framework that is built around the concept of code generation.

Goal Goal is a set of tools for high productivity web development in Go language. Goal, being mostly inspired by Revel Framework and its discussions,

Sep 27, 2021
Podman based development-only dependency manager for Linux.

Tent is a CLI tool for running development dependencies such as MySQL, Mongo, ElasticSearch etc inside pre-configured containers using simple one

Aug 30, 2022
Micro is a platform for cloud native development
Micro is a platform for cloud native development

Micro Overview Micro addresses the key requirements for building services in the cloud. It leverages the microservices architecture pattern and provid

Dec 29, 2022
A super simple Lodash like utility library with essential functions that empowers the development in Go
A super simple Lodash like utility library with essential functions that empowers the development in Go

A simple Utility library for Go Go does not provide many essential built in functions when it comes to the data structure such as slice and map. This

Jan 4, 2023
📖 A little book on Ethereum Development with Go (golang)
📖 A little book on Ethereum Development with Go (golang)

Ethereum Development with Go A little book on Ethereum Development with Go (golang) Online https://goethereumbook.org E-book The e-book is avaiable in

Dec 29, 2022