Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generating with -debug -fs results in compile error #29

Closed
biskit opened this issue Jun 26, 2019 · 5 comments · Fixed by #33
Closed

generating with -debug -fs results in compile error #29

biskit opened this issue Jun 26, 2019 · 5 comments · Fixed by #33

Comments

@biskit
Copy link

biskit commented Jun 26, 2019

hi,
if i do go-bindata -debug -fs -prefix "build/" build/... and then compile the resulting file I get this error.

./bindata.go:138:10: undefined: bindataFileInfo

Obviously, the difference is

// newDirFileInfo return default dir file info
func newDirFileInfo(name string) os.FileInfo {
        return &bindataFileInfo{
                name:    name,
                size:    0,
                mode:    os.FileMode(2147484068), // equal os.FileMode(0644)|os.ModeDir
                modTime: time.Time{}}
}

does not have

type bindataFileInfo struct {
        name    string
        size    int64
        mode    os.FileMode
        modTime time.Time
}

// Name return file name
func (fi bindataFileInfo) Name() string {
        return fi.name
}

// Size return file size
func (fi bindataFileInfo) Size() int64 {
        return fi.size
}

// Mode return file mode
func (fi bindataFileInfo) Mode() os.FileMode {
        return fi.mode
}

// Mode return file modify time
func (fi bindataFileInfo) ModTime() time.Time {
        return fi.modTime
}

// IsDir return file whether a directory
func (fi bindataFileInfo) IsDir() bool {
        return fi.mode&os.ModeDir != 0
}

// Sys return file is sys mode
func (fi bindataFileInfo) Sys() interface{} {
        return nil
}

generated with -debug switch.

go-bindata -version
go-bindata 3.1.3 (Go runtime go1.12.5).
Copyright (c) 2010-2013, Jim Teeuwen.

thanks!

@christoph-k
Copy link
Contributor

I opened a pull request to fix this. Would be nice if anybody could review and merge it.

@biskit
Copy link
Author

biskit commented Jul 30, 2019

👍

@kevinburke
Copy link

This should be fixed on my fork (which also fixed the tests and ensured you can't have this kind of error again), github.com/kevinburke/go-bindata. That's also the one you get if you install from Homebrew.

@christoph-k
Copy link
Contributor

Any update on this? No merge for about a month. Is this project still active?

@biskit
Copy link
Author

biskit commented Aug 25, 2019

not sure if there's one with permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants