Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Jul 11, 2022
1 parent bde7285 commit 194e7d0
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 147 deletions.
25 changes: 0 additions & 25 deletions core/service/correlation.go

This file was deleted.

25 changes: 0 additions & 25 deletions core/service/correlation_test.go

This file was deleted.

1 change: 1 addition & 0 deletions core/service/file_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ func (fs *FileSystem) DeleteFile(path string) error {
// ReadFile get the file content
func (fs *FileSystem) ReadFile(path string) (string, error) {
data, err := ioutil.ReadFile(path)

if err != nil {
return "", err
}
Expand Down
5 changes: 4 additions & 1 deletion core/service/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func (i *Installer) DownloadFromURL(dir string, url string) (string, error) {

// Untar uncompress a .tar.gz file
func (i *Installer) Untar(extractPath, sourcefilePath string) error {

file, err := os.Open(sourcefilePath)

if err != nil {
Expand All @@ -78,6 +79,7 @@ func (i *Installer) Untar(extractPath, sourcefilePath string) error {
var fileReader io.ReadCloser = file

if strings.HasSuffix(sourcefilePath, ".gz") {

if fileReader, err = gzip.NewReader(file); err != nil {
return err
}
Expand All @@ -94,6 +96,7 @@ func (i *Installer) Untar(extractPath, sourcefilePath string) error {
if err == io.EOF {
break
}

return err
}

Expand All @@ -102,7 +105,7 @@ func (i *Installer) Untar(extractPath, sourcefilePath string) error {
switch header.Typeflag {

case tar.TypeDir:
err = os.MkdirAll(filename, os.FileMode(header.Mode)) // or use 0755 if you prefer
err = os.MkdirAll(filename, os.FileMode(header.Mode))

if err != nil {
return err
Expand Down
46 changes: 0 additions & 46 deletions core/util/map.go

This file was deleted.

50 changes: 0 additions & 50 deletions core/util/map_test.go

This file was deleted.

0 comments on commit 194e7d0

Please sign in to comment.