2008-09-12 23:03:16 +00: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 23:16:31 +00:00
|
|
|
import fd "fd"
|
2008-09-12 23:03:16 +00:00
|
|
|
|
|
|
|
func main() {
|
2009-02-13 22:48:32 +00:00
|
|
|
hello := []byte('h', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '\n');
|
2009-01-09 23:16:31 +00: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 22:58:14 +00:00
|
|
|
sys.Exit(1);
|
2008-09-12 23:03:16 +00:00
|
|
|
}
|
|
|
|
}
|