moving manager over to the engine for now
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user