Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
b
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
b
Commits
6ad444c4
Commit
6ad444c4
authored
Aug 11, 2014
by
cznic
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from kortschak/put-doc
Fix example signature for Put explanation
parents
5c732b36
4157885c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
btree.go
btree.go
+1
-1
No files found.
btree.go
View file @
6ad444c4
...
...
@@ -639,7 +639,7 @@ func (t *Tree) Set(k interface{} /*K*/, v interface{} /*V*/) {
//
// tree.Set(k, v) conceptually equals
//
// tree.Put(k, func(
k, v []byte){ return v, true }([]byte, bool)
)
// tree.Put(k, func(
_ interface{}, _ bool){ return v, true }) (interface{}, bool
)
//
// modulo the differing return values.
func
(
t
*
Tree
)
Put
(
k
interface
{}
/*K*/
,
upd
func
(
oldV
interface
{}
/*V*/
,
exists
bool
)
(
newV
interface
{}
/*V*/
,
write
bool
))
(
oldV
interface
{}
/*V*/
,
written
bool
)
{
...
...
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