working on the commit system

This commit is contained in:
2020-09-08 20:44:02 -04:00
parent cb24c6f2c8
commit 951cda3b25
26 changed files with 378 additions and 31 deletions

View File

@@ -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
}