daily pastebin goal
36%
SHARE
TWEET

[Go] Error when reading files.

cwchen Oct 28th, 2017 189 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package main
  2.  
  3. import (
  4.     "log"
  5.     "os"
  6. )
  7.  
  8. func main() {
  9.     file, err := os.Open("file.txt")
  10.     if err != nil {
  11.         log.Fatal(err)
  12.     }
  13.  
  14.     // Do something on file object.
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top