feat: add IsZipFile

This commit is contained in:
dudaodong committed 2023-04-24 11:00:58 +08:00
1 parent aaf45012e4
commit 5e79eaa9dd
6 files changed
+95 -3

No files matched your search

+12
View File
@@ -223,3 +223,15 @@ func ExampleUnZip() {
// Output:
// application/octet-stream
}
func ExampleIsZipFile() {
result1 := IsZipFile("./file.go")
result2 := IsZipFile("./test/file.go.zip")
fmt.Println(result1)
fmt.Println(result2)
// Output:
// false
// true
}