Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
4f6ba4c8
Commit
4f6ba4c8
authored
Aug 04, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use new export syntax to avoid repetition
R=gri OCL=13819 CL=13819
parent
997a9429
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
247 deletions
+4
-247
src/syscall/errstr_darwin.go
src/syscall/errstr_darwin.go
+2
-111
src/syscall/errstr_linux.go
src/syscall/errstr_linux.go
+2
-136
No files found.
src/syscall/errstr_darwin.go
View file @
4f6ba4c8
...
@@ -4,9 +4,7 @@
...
@@ -4,9 +4,7 @@
package
syscall
package
syscall
export
errstr
export
const
(
const
(
ENONE
=
0
;
ENONE
=
0
;
EPERM
=
1
;
EPERM
=
1
;
ENOENT
=
2
;
ENOENT
=
2
;
...
@@ -113,113 +111,6 @@ const (
...
@@ -113,113 +111,6 @@ const (
ELAST
=
103
;
ELAST
=
103
;
)
)
export
(
ENONE
,
EPERM
,
ENOENT
,
ESRCH
,
EINTR
,
EIO
,
ENXIO
,
E2BIG
,
ENOEXEC
,
EBADF
,
ECHILD
,
EDEADLK
,
ENOMEM
,
EACCES
,
EFAULT
,
ENOTBLK
,
EBUSY
,
EEXIST
,
EXDEV
,
ENODEV
,
ENOTDIR
,
EISDIR
,
EINVAL
,
ENFILE
,
EMFILE
,
ENOTTY
,
ETXTBSY
,
EFBIG
,
ENOSPC
,
ESPIPE
,
EROFS
,
EMLINK
,
EPIPE
,
EDOM
,
ERANGE
,
EAGAIN
,
EINPROGRESS
,
EALREADY
,
ENOTSOCK
,
EDESTADDRREQ
,
EMSGSIZE
,
EPROTOTYPE
,
ENOPROTOOPT
,
EPROTONOSUPPORT
,
ESOCKTNOSUPPORT
,
ENOTSUP
,
EPFNOSUPPORT
,
EAFNOSUPPORT
,
EADDRINUSE
,
EADDRNOTAVAIL
,
ENETDOWN
,
ENETUNREACH
,
ENETRESET
,
ECONNABORTED
,
ECONNRESET
,
ENOBUFS
,
EISCONN
,
ENOTCONN
,
ESHUTDOWN
,
ETOOMANYREFS
,
ETIMEDOUT
,
ECONNREFUSED
,
ELOOP
,
ENAMETOOLONG
,
EHOSTDOWN
,
EHOSTUNREACH
,
ENOTEMPTY
,
EPROCLIM
,
EUSERS
,
EDQUOT
,
ESTALE
,
EREMOTE
,
EBADRPC
,
ERPCMISMATCH
,
EPROGUNAVAIL
,
EPROGMISMATCH
,
EPROCUNAVAIL
,
ENOLCK
,
ENOSYS
,
EFTYPE
,
EAUTH
,
ENEEDAUTH
,
EPWROFF
,
EDEVERR
,
EOVERFLOW
,
EBADEXEC
,
EBADARCH
,
ESHLIBVERS
,
EBADMACHO
,
ECANCELED
,
EIDRM
,
ENOMSG
,
EILSEQ
,
ENOATTR
,
EBADMSG
,
EMULTIHOP
,
ENODATA
,
ENOLINK
,
ENOSR
,
ENOSTR
,
EPROTO
,
ETIME
,
EOPNOTSUPP
,
ELAST
)
var
error
[
ELAST
]
string
;
var
error
[
ELAST
]
string
;
func
init
(){
func
init
(){
...
@@ -344,7 +235,7 @@ func str(val int64) string { // do it here rather than with fmt to avoid depend
...
@@ -344,7 +235,7 @@ func str(val int64) string { // do it here rather than with fmt to avoid depend
return
string
(
buf
)[
i
:
len
(
buf
)];
return
string
(
buf
)[
i
:
len
(
buf
)];
}
}
func
errstr
(
errno
int64
)
string
{
export
func
errstr
(
errno
int64
)
string
{
if
errno
<
0
||
errno
>=
len
(
error
)
{
if
errno
<
0
||
errno
>=
len
(
error
)
{
return
"Error "
+
str
(
errno
)
return
"Error "
+
str
(
errno
)
}
}
...
...
src/syscall/errstr_linux.go
View file @
4f6ba4c8
...
@@ -4,9 +4,7 @@
...
@@ -4,9 +4,7 @@
package
syscall
package
syscall
export
errstr
export
const
(
const
(
ENONE
=
0
;
ENONE
=
0
;
EPERM
=
1
;
EPERM
=
1
;
ENOENT
=
2
;
ENOENT
=
2
;
...
@@ -138,138 +136,6 @@ const (
...
@@ -138,138 +136,6 @@ const (
ELAST
=
130
;
ELAST
=
130
;
)
)
export
(
ENONE
,
EPERM
,
ENOENT
,
ESRCH
,
EINTR
,
EIO
,
ENXIO
,
E2BIG
,
ENOEXEC
,
EBADF
,
ECHILD
,
EAGAIN
,
ENOMEM
,
EACCES
,
EFAULT
,
ENOTBLK
,
EBUSY
,
EEXIST
,
EXDEV
,
ENODEV
,
ENOTDIR
,
EISDIR
,
EINVAL
,
ENFILE
,
EMFILE
,
ENOTTY
,
ETXTBSY
,
EFBIG
,
ENOSPC
,
ESPIPE
,
EROFS
,
EMLINK
,
EPIPE
,
EDOM
,
ERANGE
,
EDEADLK
,
ENAMETOOLONG
,
ENOLCK
,
ENOSYS
,
ENOTEMPTY
,
ELOOP
,
ENOMSG
,
EIDRM
,
ECHRNG
,
EL2NSYNC
,
EL3HLT
,
EL3RST
,
ELNRNG
,
EUNATCH
,
ENOCSI
,
EL2HLT
,
EBADE
,
EBADR
,
EXFULL
,
ENOANO
,
EBADRQC
,
EBADSLT
,
EBFONT
,
ENOSTR
,
ENODATA
,
ETIME
,
ENOSR
,
ENONET
,
ENOPKG
,
EREMOTE
,
ENOLINK
,
EADV
,
ESRMNT
,
ECOMM
,
EPROTO
,
EMULTIHOP
,
EDOTDOT
,
EBADMSG
,
EOVERFLOW
,
ENOTUNIQ
,
EBADFD
,
EREMCHG
,
ELIBACC
,
ELIBBAD
,
ELIBSCN
,
ELIBMAX
,
ELIBEXEC
,
EILSEQ
,
ERESTART
,
ESTRPIPE
,
EUSERS
,
ENOTSOCK
,
EDESTADDRREQ
,
EMSGSIZE
,
EPROTOTYPE
,
ENOPROTOOPT
,
EPROTONOSUPPORT
,
ESOCKTNOSUPPORT
,
EOPNOTSUPP
,
EPFNOSUPPORT
,
EAFNOSUPPORT
,
EADDRINUSE
,
EADDRNOTAVAIL
,
ENETDOWN
,
ENETUNREACH
,
ENETRESET
,
ECONNABORTED
,
ECONNRESET
,
ENOBUFS
,
EISCONN
,
ENOTCONN
,
ESHUTDOWN
,
ETOOMANYREFS
,
ETIMEDOUT
,
ECONNREFUSED
,
EHOSTDOWN
,
EHOSTUNREACH
,
EALREADY
,
EINPROGRESS
,
ESTALE
,
EUCLEAN
,
ENOTNAM
,
ENAVAIL
,
EISNAM
,
EREMOTEIO
,
EDQUOT
,
ENOMEDIUM
,
EMEDIUMTYPE
,
ECANCELED
,
ENOKEY
,
EKEYEXPIRED
,
EKEYREVOKED
,
EKEYREJECTED
,
ELAST
)
var
error
[
ELAST
]
string
;
var
error
[
ELAST
]
string
;
func
init
(){
func
init
(){
...
@@ -418,7 +284,7 @@ func str(val int64) string { // do it here rather than with fmt to avoid depend
...
@@ -418,7 +284,7 @@ func str(val int64) string { // do it here rather than with fmt to avoid depend
return
string
(
buf
)[
i
:
len
(
buf
)];
return
string
(
buf
)[
i
:
len
(
buf
)];
}
}
func
errstr
(
errno
int64
)
string
{
export
func
errstr
(
errno
int64
)
string
{
if
errno
<
0
||
errno
>=
len
(
error
)
{
if
errno
<
0
||
errno
>=
len
(
error
)
{
return
"Error "
+
str
(
errno
)
return
"Error "
+
str
(
errno
)
}
}
...
...
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