Go has a very robust support for working with files.
Here's a program that opens a file, reads its content and closes the file:
https://codeeval.dev/gist/2f493d47f6d8bb328a3a86e4bbefff9c
Reading files
Writing files
File operations
Directory operations
File path operations
I/O related interfaces