mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net: fix docs for type IP: s/array/slice/.
R=rsc CC=golang-dev https://golang.org/cl/6930047
This commit is contained in:
parent
614b02d22a
commit
699b99fa75
1 changed files with 4 additions and 4 deletions
|
|
@ -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 (
|
||||||
IPv6len = 16
|
IPv6len = 16
|
||||||
)
|
)
|
||||||
|
|
||||||
// An IP is a single IP address, an 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) arrays as input.
|
// or 16-byte (IPv6) slices 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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue