/igo

A zero-configuration build system for the Go programming language.

Primary LanguageGoBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

igo is an attempt to created a zero-configuration build system for Go.  You
structure your project as multiple packages in multiple sub-directories, and
can build and test all or part of the project with a single command, without
makefiles.

For example, consider the following directory structure:

    foo/
        foo1.go  (package foo)
        foo2.go  (package foo)

        foo1_test.go
        foo2_test.go

    bar/
        bar.go  (package bar)
        bar_test.go

        baz/
            qwerty.go  (package bar/baz)
            qwerty_test.go

    driver1/
        driver1.go (package main)

    driver2/
        driver2.go (package main)

Assume that the packages have these imports:

    foo:
        import "fmt"
        import "http"

    bar:
        import "./bar/baz"
        import "./foo"
        import "http"

    baz:
        import "./foo"

    driver1:
        import "./bar"
        import "./foo"

Then the igo commands below will perform the following actions:

    igo build foo
    (Build foo1.go and foo2.go)

    igo build bar
    (Build foo, then build bar/baz, then build bar.go)

    igo build bar/baz
    (Build foo, then build qwerty.go)

    igo test foo
    (Build foo as above, then build and run foo*_test.go)

    igo build driver1
    (Build foo, then build bar, then build and link driver1.go)

    igo run driver1
    (Build driver1 as above, then run it)

Dependencies are derived purely from imports within .go files, and no makefiles
are required.