elazarl / go-bindata-assetfs

Serves embedded files from `jteeuwen/go-bindata` with `net/http`
BSD 2-Clause "Simplified" License
870 stars 116 forks source link

does not handle -o properly #34

Open markfink opened 8 years ago

markfink commented 8 years ago

I am just getting started with your tool. Great job!

I noticed an error message when I use it for my assets:

$ go-bindata-assetfs -pkg gogrinder -o gogrinder/assetfs.go web/...
Cannot read bindata.go open bindata.go: no such file or directory

creates the asset file but this is section missing:

func assetFS() *assetfs.AssetFS {
    for k := range _bintree.Children {
        return &assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, AssetInfo: AssetInfo, Prefix: k}
    }
    panic("unreachable")
}
elazarl commented 8 years ago

Hi,

I'll look into it, but I seriously suggest to you moving to rice.go, it looks like a better solution which I was not aware of when starting this project.

markfink commented 8 years ago

hmm. I moved to here because go.rice is a bit buggy and apparently dead https://github.com/GeertJohan/go.rice/issues/79

andreynering commented 8 years ago

I'm also having problems with the -o flag:

//go:generate go-bindata-assetfs -nometadata -pkg mypkg -o ./bindata/mypkg/myfile.go public/bundle

I'm facing the following error:

Cannot read bindata.go open bindata.go: O sistema não pode encontrar o arquivo especificado.

Works OK without the flag. I'm on Windows.

donatj commented 8 years ago

I'm getting the same issue:

» go-bindata-assetfs -o ./assets.go  assets                   1↵ 16:26:08
Cannot read bindata.go open bindata.go: no such file or directory
binary132 commented 8 years ago

ditto

andreynering commented 8 years ago

For anyone looking for an alternative, fileb0x is much more stable and complete. I moved to it.

codeskyblue commented 8 years ago

+1 about

Cannot read bindata.go open bindata.go: no such file or directory
elazarl commented 8 years ago

I'd also mention rice.go which I personally use. One of the reasons I'm not putting too much effort in this project, is because there are better alternative available. I'm still keeping it, since some people depend on it, but I'm trying not to break things, and I only accept PR, and do not invest in it myself. At the time I wrote this project, those other projects didn't exist (or maybe they didn't but I didn't find them).

On Thu, Oct 20, 2016 at 11:15 PM Andrey Nering notifications@github.com wrote:

For anyone looking for an alternative, fileb0x https://github.com/UnnoTed/fileb0x is much more stable and complete. I moved to it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/elazarl/go-bindata-assetfs/issues/34#issuecomment-255215503, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP4on8NyrxPTDS4V9f9ai_GQ7MEUMYpks5q18vqgaJpZM4Hp8Xf .

codeskyblue commented 8 years ago

so which project do you suggest?

iiinsomnia commented 7 years ago

+1

Cannot read bindata.go open bindata.go: no such file or directory
sunshinekitty commented 7 years ago

I had issues with the index route on my Vue app infinitely redirecting to "..//" while using this to embed my assets. I've moved to https://github.com/UnnoTed/fileb0x which works fine.

tsarna commented 4 years ago

Look like a fix was merged, we just need a new release that contains it.