GG, a go builder
Home Home Contact us Contact
home News Projects Tests Files Follow manatlan on Twitter Sign in
Last edition : 2010/02/11 21:47

GG is a builder for the go language. It makes easy to build your go files into an executable. It's released under the terms of the BSD License. GG is not as powerful as make ;-). But it lets you build a simple file or a simple project. Projects can be described in the yaml language.

features :

  • incremental builds (on project)
  • respect order of buildings
  • clear mode
  • simple


3 ways of use :

Build and run one file

gg file.go

GG will simply compile, build (an executable named file) and run this one. (it's the same purpose as python

Note : you can use the "-m" switch to just make the executable (don't run).

Run gg'makefile project

gg'makefile is a kind of makefile in the yaml language. It helps you to describe your build. You can create a simple yaml file, "" like that :

   f1.go    # main.main()



and run GG like that:


GG will compile module1.a with (with gX.go files), compile module2.a (with h1.go), and will build the executable my_exe, and will run it. It's dead simple.

Run shebang's line project

But sometimes, you don't have time to create a makefile, or you don't want to reconfigure your environment or your editor. But you just want to compile files together. You can do that by creating "shebang's line project". In fact, you describe your project in the first line of your file, using the yaml one line syntax :

You can write something like that :

//gg:{exe: file.go, module.a: f1.go f2.go f3.go}
package main

and if you run :

gg file.go

GG will create the "module.a", using fX.go files. And it will build the executable exe with file.go, and run it. Really handy (it's what I use the most)

Command line switches

  • v verbose mode
  • c clear all modules and executables for this build.
  • m just make (don't run)
  • f full rebuild (don't build incremental)


  • It uses your GOARCH/GOBIN environment variables
  • In a shebang's makefile or a gg'makefile : you can build many executables (or none) or many packages or none. But GG will run the executable only if there is only one !

Download & install


to build it :

8g gg.go && 8l -o gg gg.8

or using gg:

gg gg.go


0.7 : - updated to current release of go (2010/02/11)
0.6 : - bugfix: full rebuild process was breaked when many packages
0.5 : - patchs from Steve (cosmetic)
      - remove the space at the beginning of the error (gedit is happy now)
      - bugfix: exe weren't rebuilded after a module rebuilded
      - throw an error for non-wellformed gg'makefile
0.4 : - respect order of modules(.a) for build operations
0.3 : - bugfix: in relative files
      - incremental build (based on mtime)
      - new flag 'f' for full rebuild (no incremental)
0.2 : can use comments in yaml gg'makefile (with '#')
0.1 : initial public release
RSS Python Powered Get Ubuntu
©opyleft 2008-2019 - manatlan