mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-09 15:12:26 +08:00
feat: add IsZipFile
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user