Created
September 15, 2019 14:50
-
-
Save hitechqb/9227cb0f7599d527bb585814b50a8dd8 to your computer and use it in GitHub Desktop.
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
func ReadFile() { | |
filename := os.Getenv("fileExample") | |
file, err := os.Open(filename) | |
if err != nil { | |
return errors.Wrapf(err, "unable to open %s", filename) | |
} | |
defer file.Close() | |
count, err := count(bufio.NewReader(file)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment