gobs /

Filename Size Date modified Message
13 B
2.3 KB
7.2 KB
2.1 KB
1.7 KB
169 B
887 B
117.6 KB
1.9 KB
634 B
9.4 KB
2.8 KB
2.4 KB
2.3 KB
2.7 KB

GOBS - build system and package manager for go language.

System description.

Many program languages have tools for managing dependencies. For example, java developers use maven or ivy. There's a tool npm for node.js. And so on.

Go-language have a tool go for it. However, it has some disadvantages:

  • There is no document, describing project dependencies.
  • go get tool uses compiler version to select appropriate dependency version, but not version required by project.
  • Uses system variable GOPATH as project root.

GOBS system attempts to solve this problems.

Quick start.

First of all, you need to install the gobs tool:

go get bitbucket.org/vegansk/gobs

If your system variable PATH contains $GOPATH/bin, then you can use the gobs command from your shell. Let's make a "Hello, world!" application. The first step is to create the project. Execute following command in desired directory:

gobs create -version 1.0 -license GPLv3 -desc "My first GOBS application" hw

Then change directory to the project sources:

cd hw/src/hw

Add a dependency to the project by creating deps object in goproject.json:

    "name": "hw",
    "version": "1.0",
    "description": "My first GOBS application",
    "license": "GPLv3",

    "deps": {
        "bitbucket.org/vegansk/gobs/examplelib": "*"

Resolve dependencies with command:

gobs resolve

Create a file named hw.go with the following content:

package main

import "bitbucket.org/vegansk/gobs/examplelib"

func main() {

Build project using command:

gobs build

Cd to binary directory and execute project:

cd ../../bin && ./hw

You should see the message in the console:

Hello, world!

Project structure.

GOBS use standard directory structure for project, as described here.

There are two files, related to GOBS:

  • .goproject, located in the root of the workspace. Contains path to current project in src directory.
  • goproject.json, located in the root of the project's sources.