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 <bot@codelingo.io>
  • Loading branch information
CodeLingoBot committed Feb 18, 2019
1 parent 9374c26 commit cf60974
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cache/cache.go
Expand Up @@ -155,7 +155,7 @@ func fnv32(key string) uint32 {
return hash
}

// Returns shard under given key
// GetShard returns shard under given key
func (c *Cache) GetShard(key string) *Shard {
// @TODO: remove type casts?
return c.data[uint(fnv32(key))%uint(shardCount)]
Expand Down Expand Up @@ -269,7 +269,7 @@ func (c *Cache) Add(p *points.Points) {
atomic.AddInt32(&c.stat.size, int32(count))
}

// Removes an element from the map and returns it
// Pop removes an element from the map and returns it
func (c *Cache) Pop(key string) (p *points.Points, exists bool) {
// Try to get shard.
shard := c.GetShard(key)
Expand Down
2 changes: 1 addition & 1 deletion carbon/config.go
Expand Up @@ -251,7 +251,7 @@ func NewConfig() *Config {
return cfg
}

// PrintConfig ...
// PrintDefaultConfig ...
func PrintDefaultConfig() error {
cfg := NewConfig()
buf := new(bytes.Buffer)
Expand Down

0 comments on commit cf60974

Please sign in to comment.