Skip to content

Instantly share code, notes, and snippets.

@gregworley
Created September 22, 2010 17:27
Show Gist options
  • Save gregworley/592120 to your computer and use it in GitHub Desktop.
Save gregworley/592120 to your computer and use it in GitHub Desktop.
package main
import (
"./iopkg"
"fmt"
"os"
)
func main() {
hello := []byte("hello, world\n")
file.Stdout.Write(hello)
file, err := file.Open("/does/not/exist", 0, 0)
if file == nil {
fmt.Printf("can't open file; err=%s\n", err.String())
os.Exit(1)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment