Skip to content

Developing & Building

Shannon Wynter edited this page Nov 16, 2017 · 1 revision

This project is written in The Go Programming Language which means there's not much you need to do to get started!

Head over to the download page and grab the latest binary package for your chosen operating system.

I'm going to cover instructions for Linux and MacOS (basically plagiarising the official documentation), I don't do any development on windows these days but the instructions are basically the same, you'll have to configure your path to make the go tools and $GOPATH/bin/go available.

OSX

Grab the latest go1...darwin-amd64.pkg, once it's finished downloading, double click and install and that's basically done.

To make your life easier you can edit the .bashrc in your home dir (you might need to create one) and add

GOPATH=$HOME/go
PATH=$GOPATH/bin:$PATH

Linux

I'm making the assumption you're working on an 64bit architecture, but the instructions are basically the same, it's the name of the download that changes

Grab the latest go1...linux-amd64.tar.gz, once it's finished downloading, drop into a console/terminal (if you're not already there)

tar -C /usr/local -xzf go1.*.*.linux-amd64.tar.gz

Edit the .bashrc file in your home dir and add

GOPATH=$HOME/go
PATH=$GOPATH/bin:/usr/local/go/bin:$PATH

Downloading the project and all it's packages

Open up a new terminal and simply run go get github.com/freman/nbntest this will download this package and all it's dependancies.

Building

For the default architecture and OS

cd $GOPATH/src/github.com/freman/nbntest/cmd/nbntest
go build

For another one (for example a raspberry pi

cd $GOPATH/src/github.com/freman/nbntest/cmd/nbntest
GOARCH=arm GOOS=linux go build

Clone this wiki locally