Skip to content

Instantly share code, notes, and snippets.

@yosmoc
Created April 2, 2014 20:08
Show Gist options
  • Save yosmoc/9942073 to your computer and use it in GitHub Desktop.
Save yosmoc/9942073 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"io/ioutil"
"log"
)
func main() {
file, err := ioutil.ReadFile("for.go")
if err != nil {
log.Fatal(err)
return
}
contents := string(file)
fmt.Println(contents)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment