Created
October 27, 2022 19:05
-
-
Save Aphellirus/dfec017e6fd835e3568a11a2d964b6f3 to your computer and use it in GitHub Desktop.
How to know the file extension from byte array in golang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//contents []byte | |
//package filetype | |
kind, err := filetype.Match(contents) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment