moving manager over to the engine for now

This commit is contained in:
2020-07-01 20:23:22 -04:00
parent 07bbb442ef
commit 6379c73e38
11 changed files with 219 additions and 544 deletions

View File

@@ -4,7 +4,6 @@ import (
"crypto/sha256"
"fmt"
"io/ioutil"
"os"
"time"
)
@@ -15,7 +14,7 @@ type Commit struct {
Date string
Version string //User can tag a commit with a version number
Branch string //Branch this commit belongs to
Number string // The commit number
Number int // The commit number
}
// CommitMeta stores the meta information about the commit
@@ -43,11 +42,7 @@ type File struct {
// CalculateHash creates a hash for the file
func (f *File) CalculateHash() error {
file, err := os.Open(f.Path)
if err != nil {
return fmt.Errorf("unable to open file: %s err: %s", f.Path, err)
}
fileContents, err := ioutil.ReadAll(file)
fileContents, err := ioutil.ReadFile(f.Path)
if err != nil {
return fmt.Errorf("unable to read contents of file: %s err: %s", f.Path, err)
}