-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a85d2c
commit 99e56bb
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
} |