Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
461314b6
Commit
461314b6
authored
Apr 27, 2010
by
Giles Lean
Committed by
Russ Cox
Apr 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os: create sys_bsd.go
R=rsc CC=golang-dev
https://golang.org/cl/897042
parent
bf1c881a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
18 deletions
+7
-18
Makefile
src/pkg/os/Makefile
+5
-1
sys_bsd.go
src/pkg/os/sys_bsd.go
+2
-1
sys_freebsd.go
src/pkg/os/sys_freebsd.go
+0
-16
No files found.
src/pkg/os/Makefile
View file @
461314b6
...
...
@@ -15,24 +15,28 @@ GOFILES=\
path.go
\
proc.go
\
stat_
$(GOOS)
.go
\
sys_
$(GOOS)
.go
\
time.go
\
types.go
\
GOFILES_freebsd
=
\
file_unix.go
\
sys_bsd.go
\
GOFILES_darwin
=
\
file_unix.go
\
sys_bsd.go
\
GOFILES_linux
=
\
file_unix.go
\
sys_linux.go
\
GOFILES_nacl
=
\
file_unix.go
\
sys_nacl.go
\
GOFILES_mingw
=
\
file_mingw.go
\
sys_mingw.go
\
GOFILES
+=
$
(
GOFILES_
$(GOOS)
)
...
...
src/pkg/os/sys_
darwin
.go
→
src/pkg/os/sys_
bsd
.go
View file @
461314b6
...
...
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Darwin-specific
// os code shared between *BSD systems including OS X (Darwin)
// and FreeBSD.
package
os
...
...
src/pkg/os/sys_freebsd.go
deleted
100644 → 0
View file @
bf1c881a
// 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
)
{
var
errno
int
name
,
errno
=
syscall
.
Sysctl
(
"kern.hostname"
)
if
errno
!=
0
{
return
""
,
NewSyscallError
(
"sysctl kern.hostname"
,
errno
)
}
return
name
,
nil
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment