2008-09-12 17:03:16 -06:00
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
2009-01-09 16:16:31 -07:00
|
|
|
import fd "fd"
|
2008-09-12 17:03:16 -06:00
|
|
|
|
|
|
|
func main() {
|
2008-09-17 13:14:52 -06:00
|
|
|
hello := []byte{'h', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '\n'};
|
2009-01-09 16:16:31 -07:00
|
|
|
fd.Stdout.Write(hello);
|
|
|
|
file, err := fd.Open("/does/not/exist", 0, 0);
|
|
|
|
if file == nil {
|
|
|
|
print("can't open file; err=", err.String(), "\n");
|
2009-01-16 15:58:14 -07:00
|
|
|
sys.Exit(1);
|
2008-09-12 17:03:16 -06:00
|
|
|
}
|
|
|
|
}
|