- 
                Notifications
    You must be signed in to change notification settings 
- Fork 187
Open
Description
I have a deb file and after running the following code I get kind.Extension is ar instead of deb
buf, _ := ioutil.ReadFile("foo.deb")
kind, _ filetype.Match(buf)
fmt.Print(kind.Extension)
fmt.Print(kind.MIME.Value)
Output
ar
application/x-unix-archive
On other tries, I see the following output
deb
application/vnd.debian.binary-package
I'm guessing that it's due to arMagic and debMagic sharing the same first 7 bytes and that the ar matcher is sometimes running before deb matcher. Since arMagic and debMagic are added to a map, there's no guarantee as to the order when they get registered.
Metadata
Metadata
Assignees
Labels
No labels