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
43d63893
Commit
43d63893
authored
Aug 16, 2011
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builtin: tweak a couple of descriptions.
R=golang-dev, adg, dsymonds CC=golang-dev
https://golang.org/cl/4875050
parent
03109350
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/pkg/builtin/builtin.go
src/pkg/builtin/builtin.go
+8
-6
No files found.
src/pkg/builtin/builtin.go
View file @
43d63893
...
...
@@ -45,18 +45,20 @@ func copy(dst, src []Type) int
// The len built-in function returns the length of v, according to its type:
// Array: the number of elements in v.
// Pointer to array: the number of elements in *v.
// Slice, or map: the number of elements in v
. I
f v is nil, len(v) is zero.
// Pointer to array: the number of elements in *v
(even if v is nil)
.
// Slice, or map: the number of elements in v
; i
f v is nil, len(v) is zero.
// String: the number of bytes in v.
// Channel: the number of elements queued (unread) in the channel buffer
.
//
I
f v is nil, len(v) is zero.
// Channel: the number of elements queued (unread) in the channel buffer
;
//
i
f v is nil, len(v) is zero.
func
len
(
v
Type
)
int
// The cap built-in function returns the capacity of v, according to its type:
// Array: the number of elements in v (same as len(v)).
// Pointer to array: the number of elements in *v (same as len(v)).
// Slice: the maximum length the slice can reach when resliced.
// Channel: the maximum channel buffer capacity, in units of elements.
// Slice: the maximum length the slice can reach when resliced;
// if v is nil, cap(v) is zero.
// Channel: the channel buffer capacity, in units of elements;
// if v is nil, cap(v) is zero.
func
cap
(
v
Type
)
int
// The make built-in function allocates and initializes an object of type
...
...
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