summaryrefslogtreecommitdiff
path: root/src/pkg/os/sys_windows.go
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2010-04-29 23:45:14 -0700
committerAlex Brainman <alex.brainman@gmail.com>2010-04-29 23:45:14 -0700
commitd21385cfae083d2b210c26bc6d1f4983eff9113a (patch)
treefc76460a00d90bb96293f1f8f9516846c0b410ef /src/pkg/os/sys_windows.go
parent52f66a0ccf87f10aaabbf573aea89c4a55d134a0 (diff)
downloadgolang-d21385cfae083d2b210c26bc6d1f4983eff9113a.tar.gz
rename GOOS=mingw to GOOS=windows
R=rsc, Joe Poirier CC=golang-dev http://codereview.appspot.com/1015043 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/pkg/os/sys_windows.go')
-rw-r--r--src/pkg/os/sys_windows.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pkg/os/sys_windows.go b/src/pkg/os/sys_windows.go
new file mode 100644
index 000000000..a78798458
--- /dev/null
+++ b/src/pkg/os/sys_windows.go
@@ -0,0 +1,15 @@
+// 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 os
+
+import "syscall"
+
+func Hostname() (name string, err Error) {
+ s, e := syscall.ComputerName()
+ if e != 0 {
+ return "", NewSyscallError("ComputerName", e)
+ }
+ return s, nil
+}