AFunnyAnt

Results 2 comments of AFunnyAnt

mimetype.SetLimit(0) mimeType, xerr := mimetype.DetectFile("./TortoiseGit-32bit.msi") if xerr != nil { fmt.Println("open failed", xerr) } fmt.Println("type:", mimeType.String()) fmt.Println("Extension:", mimeType.Extension()) type: application/msword Extension: .doc the msi link is: https://download.tortoisegit.org/tgit/2.12.0.0/TortoiseGit-2.12.0.0-32bit.msi

Thanks, in the above way, the problem is solved。 the result: mime: application/x-ms-installer Extension: .msi