working on the commit system
This commit is contained in:
@@ -19,12 +19,12 @@ type SomeStruct struct {
|
||||
}
|
||||
|
||||
// CompressFile uses pgzip to compress a file for storage
|
||||
func CompressFile(path string) error {
|
||||
func CompressFile(path string, newPath string) error {
|
||||
fileBytes, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to read file: %s", path)
|
||||
}
|
||||
file, err := os.Create(path)
|
||||
file, err := os.Create(newPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user