Skip to content

Commit

Permalink
Fix function comments based on best practices from Effective Go
Browse files Browse the repository at this point in the history
Signed-off-by: CodeLingo Bot <[email protected]>
  • Loading branch information
CodeLingoBot committed Feb 19, 2019
1 parent eb47e43 commit b14474b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ func (self *Conn) SubClear(key []byte) {
self.subClear(key, false)
}

// SubClear will remove all byte values from the sub tree defined by key. It will retain delete markers for all deleted values.
// SSubClear will remove all byte values from the sub tree defined by key. It will retain delete markers for all deleted values.
func (self *Conn) SSubClear(key []byte) {
self.subClear(key, true)
}
Expand Down Expand Up @@ -754,7 +754,7 @@ func (self *Conn) ReverseSlice(key, min, max []byte, mininc, maxinc bool) (resul
return
}

// ReverseSlice will return the slice between min and max in the sub tree defined by key.
// Slice will return the slice between min and max in the sub tree defined by key.
// A min of nil will return from the start. A max of nil will return to the end.
func (self *Conn) Slice(key, min, max []byte, mininc, maxinc bool) (result []common.Item) {
r := common.Range{
Expand Down Expand Up @@ -805,7 +805,7 @@ func (self *Conn) SubMirrorPrev(key, subKey []byte) (prevKey, prevValue []byte,
return
}

// SubMirrorPrev will return the next key and value after subKey in the sub tree defined by key.
// SubMirrorNext will return the next key and value after subKey in the sub tree defined by key.
func (self *Conn) SubMirrorNext(key, subKey []byte) (nextKey, nextValue []byte, existed bool) {
data := common.Item{
Key: key,
Expand Down Expand Up @@ -919,7 +919,7 @@ func (self *Conn) DescribeTree(pos []byte) (result string, err error) {
return
}

// DescribeTree will return a string representation of the complete trees of all known nodes.
// DescribeAllTrees will return a string representation of the complete trees of all known nodes.
// Used for debug purposes, don't do it on big databases!
func (self *Conn) DescribeAllTrees() string {
buf := new(bytes.Buffer)
Expand Down Expand Up @@ -1030,7 +1030,7 @@ func (self *Conn) Configuration() (conf map[string]string) {
return result.Data
}

// SubConfiguratino will return the configuration for the sub tree defined by key.
// SubConfiguration will return the configuration for the sub tree defined by key.
//
// mirrored=yes means that the sub tree is currently mirrored.
func (self *Conn) SubConfiguration(key []byte) (conf map[string]string) {
Expand Down
2 changes: 1 addition & 1 deletion dhash/dhash.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func NewNode(listenAddr, broadcastAddr string) *Node {
return NewNodeDir(listenAddr, broadcastAddr, broadcastAddr)
}

// NewNode will return a dhash.Node publishing itself on the given address.
// NewNodeDir will return a dhash.Node publishing itself on the given address.
func NewNodeDir(listenAddr, broadcastAddr, dir string) (result *Node) {
result = &Node{
node: discord.NewNode(listenAddr, broadcastAddr),
Expand Down
2 changes: 1 addition & 1 deletion discord/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func (self *Node) GetSuccessor() common.Remote {
return self.GetSuccessorForRemote(self.Remote())
}

// GetSuccessorFor will return the successor for the provided remote.
// GetSuccessorForRemote will return the successor for the provided remote.
func (self *Node) GetSuccessorForRemote(r common.Remote) common.Remote {
return self.ring.Successor(r)
}
Expand Down
2 changes: 1 addition & 1 deletion radix/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func (self *Tree) MirrorReverseIndexOf(key []byte) (index int, existed bool) {
return
}

// MirrorReverseIndexOf will return the index from the end (or the index it would have if it existed) key.
// ReverseIndexOf will return the index from the end (or the index it would have if it existed) key.
func (self *Tree) ReverseIndexOf(key []byte) (index int, existed bool) {
if self == nil {
return
Expand Down

0 comments on commit b14474b

Please sign in to comment.