FAQ
https://github.com/jessevdk/go-assets is a pretty basic asset/resource
embedding package. Assets are embedded in a single go file that is
generated. The tree structure and relevant file attributes of the assets is
preserved, i.e. it's basically a very simple in-memory file system.
Additionally, the generated asset tree also implements http.FileSystem so
using it in a web service is trivial (using http.FileServer). Embedding
assets in this way isn't really ideal (the generated go file can take long
to compile compared to normal go files). It's therefore mostly useful for
embedding only a small amount of assets in small projects (i.e. think of
few MB max).

See also http://godoc.org/github.com/jessevdk/go-assets for the
documentation and https://github.com/jessevdk/go-assets-builder for a
simple program making the Generator of the library available as a command
line application.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Miki Tebeka at Sep 8, 2013 at 3:49 am

    Embedding assets in this way isn't really ideal (the generated go file can
    take long to compile compared to normal go files). It's therefore mostly
    useful for embedding only a small amount of assets in small projects (i.e.
    think of few MB max).
    FYI: I also started that way in https://bitbucket.org/tebeka/nrsc, the long
    compilation time motivated the move to embedding a zip file in the
    executable.

    Just curios: What motivated you to write your package vs using existing
    ones? (like nrsc, embed and others)

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 2, '13 at 4:35p
activeSep 8, '13 at 3:49a
posts2
users2
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase