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
699b99fa
Commit
699b99fa
authored
Jan 03, 2013
by
Nigel Tao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: fix docs for type IP: s/array/slice/.
R=rsc CC=golang-dev
https://golang.org/cl/6930047
parent
614b02d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/pkg/net/ip.go
src/pkg/net/ip.go
+4
-4
No files found.
src/pkg/net/ip.go
View file @
699b99fa
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
// IPv4 addresses are 4 bytes; IPv6 addresses are 16 bytes.
// IPv4 addresses are 4 bytes; IPv6 addresses are 16 bytes.
// An IPv4 address can be converted to an IPv6 address by
// An IPv4 address can be converted to an IPv6 address by
// adding a canonical prefix (10 zeros, 2 0xFFs).
// adding a canonical prefix (10 zeros, 2 0xFFs).
// This library accepts either size of byte
array
but always
// This library accepts either size of byte
slice
but always
// returns 16-byte addresses.
// returns 16-byte addresses.
package
net
package
net
...
@@ -18,14 +18,14 @@ const (
...
@@ -18,14 +18,14 @@ const (
IPv6len
=
16
IPv6len
=
16
)
)
// An IP is a single IP address, a
n array
of bytes.
// An IP is a single IP address, a
slice
of bytes.
// Functions in this package accept either 4-byte (IPv4)
// Functions in this package accept either 4-byte (IPv4)
// or 16-byte (IPv6)
array
s as input.
// or 16-byte (IPv6)
slice
s as input.
//
//
// Note that in this documentation, referring to an
// Note that in this documentation, referring to an
// IP address as an IPv4 address or an IPv6 address
// IP address as an IPv4 address or an IPv6 address
// is a semantic property of the address, not just the
// is a semantic property of the address, not just the
// length of the byte
array: a 16-byte array
can still
// length of the byte
slice: a 16-byte slice
can still
// be an IPv4 address.
// be an IPv4 address.
type
IP
[]
byte
type
IP
[]
byte
...
...
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