go-bindata-assetfs icon indicating copy to clipboard operation
go-bindata-assetfs copied to clipboard

does not handle -o properly

Open ghost opened this issue 9 years ago • 12 comments
trafficstars

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")
}

ghost avatar Mar 05 '16 08:03 ghost

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.

elazarl avatar Mar 06 '16 08:03 elazarl

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

markfink avatar Mar 06 '16 16:03 markfink

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.

andreynering avatar Jul 11 '16 17:07 andreynering

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

donatj avatar Sep 09 '16 21:09 donatj

ditto

binary132 avatar Oct 20 '16 19:10 binary132

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

andreynering avatar Oct 20 '16 20:10 andreynering

+1 about

Cannot read bindata.go open bindata.go: no such file or directory

codeskyblue avatar Oct 22 '16 08:10 codeskyblue

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 [email protected] 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 .

elazarl avatar Oct 25 '16 19:10 elazarl

so which project do you suggest?

codeskyblue avatar Oct 25 '16 23:10 codeskyblue

+1

Cannot read bindata.go open bindata.go: no such file or directory

iiinsomnia avatar Jul 12 '17 07:07 iiinsomnia

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.

sunshinekitty avatar Aug 02 '17 14:08 sunshinekitty

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

tsarna avatar Jul 11 '20 15:07 tsarna