summaryrefslogtreecommitdiff
path: root/src/os/sys_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/sys_windows.go')
-rw-r--r--src/os/sys_windows.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/os/sys_windows.go b/src/os/sys_windows.go
new file mode 100644
index 000000000..92617de5e
--- /dev/null
+++ b/src/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 != nil {
+ return "", NewSyscallError("ComputerName", e)
+ }
+ return s, nil
+}