Skip to content

Commit

Permalink
#Added ReadFile Function
Browse files Browse the repository at this point in the history
  • Loading branch information
JonyBepary committed Oct 18, 2023
1 parent 5a85d2c commit 99e56bb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/utils.go
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
package pkg

import (
"os"
)

// read file from path to blob
func ReadFile(path string) []byte {
// Read the contents of the file into a byte slice
data, err := os.ReadFile(path)
if err != nil {
return nil
}
return data

}

0 comments on commit 99e56bb

Please sign in to comment.