package main
import(
"fmt"
"io/ioutil"
// I currently called it bpack which is a abbrevation for backpack
"bpack"
)
func main() {
// The backpack returns io.Reader for the requested content
r, err := bpack.Get("/public/js/jquer.min.js")
if err != nil {
// handle
}
content, err:= ioutil.ReadAll(r)
if err != nil {
// handle
}
fmt.Println("%s\n", content)
}
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I know there's allready an other solution which converts files into go code
but I'd like to be able to change the appended data without recompiling and
maybe also compress them.
I am using http://godoc.org/gopkg.in/cookieo9/resources-go.v2 and have had no problems so far.
Tar is a streaming format, thus you need to read the whole to know what is in there. But if you invent your own zip format, then it is possible.
I am using http://godoc.org/gopkg.in/cookieo9/resources-go.v2 and have had no problems so far.
Go build && cat exe zip >exe2 && zip -A exe2
AFAIK all starts reading from the beginning and no thing points after the executables end.
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/_LszV5IqBWg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.