ReadFileIntoString gets the contents of file into string
(path string)
| 347 | |
| 348 | // ReadFileIntoString gets the contents of file into string |
| 349 | func ReadFileIntoString(path string) (string, error) { |
| 350 | bytesFile, err := os.ReadFile(path) |
| 351 | if err != nil { |
| 352 | return "", err |
| 353 | } |
| 354 | return string(bytesFile), err |
| 355 | } |
| 356 | |
| 357 | // AppendStringToFile takes a path to a file and a string to append |
| 358 | // and it appends it, returning err |
no outgoing calls