Personally I use go-bindata:
https://github.com/jteeuwen/go-bindata
I use this for images, html templates, javascript etc, and it ensures
that I have all the resources available to my executable. I hook it up
using a make file to generate the Go sourcecode.
> > On Tue, Feb 28, 2012 at 2:59 PM, Brad Fitzpatrick <
bradf...@golang.org>
> > wrote:
>
> >> Here's how Camlistore does it:
>
> >> You define a file with a magic comment saying which files (a regexp) you
> >> want to embed:
>
> >>
http://code.google.com/p/camlistore/source/browse/server/camlistored/...
>
> >> ... that file also has to depend on "
camlistore.org/pkg/fileembed" and
> >> have a Files variable:
>
> >> var Files = &fileembed.Files{
> >> OverrideEnv: "CAMLI_DEV_UI_FILES",
> >> }
>
> >> The OverrideEnv is optional and say that if that environment variable is
> >> present, then the embedded resources are only a fallback, but the files on
> >> disk in that location take priority. If that environment variable isn't
> >> present, the disk is never touched. (this is useful for quick iteration
> >> during development).
>
> >> Then you run the genfileembeds command to generate zembed_*.go files:
>
> >>
http://code.google.com/p/camlistore/source/browse/#git%2Fpkg%2Ffileem...
>
> >> Which makes all the files you see here:
>
> >>
http://code.google.com/p/camlistore/source/browse/#git%2Fserver%2Fcam...
>
> >> Then, to use this, it's just like:
>
> >> import (
> >> "net/http"
> >> ...
> >> "
camlistore.org/server/camlistored/ui"
> >> )
> >> ...
> >> http.FileServer(ui.Files)
>
> >> (or whatever)
>
> >> On Tue, Feb 28, 2012 at 11:25 AM, Daniel Connelly <
dhconne...@gmail.com>