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
func uncompress(dir string) { | |
err := filepath.Walk(dir, func(path string, file os.FileInfo, err error) error { | |
if file == nil { | |
return nil | |
} | |
if file.IsDir() { | |
return nil | |
} | |
ext := filepath.Ext(path) | |
if ext == ".rar" { |
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
package main | |
import ( | |
"archive/zip" | |
"fmt" | |
"io" | |
"os" | |
) | |
func main() { |
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
func uncompress(dir string) { | |
err := filepath.Walk(dir, func(path string, file os.FileInfo, err error) error { | |
if file == nil { | |
return nil | |
} | |
if file.IsDir() { | |
return nil | |
} | |
ext := filepath.Ext(path) | |
if ext == ".zip" { |
NewerOlder