Skip to content

Commit

Permalink
Merge pull request #66 from CodeLingoBot/rewrite
Browse files Browse the repository at this point in the history
Fix function comments based on best practices from Effective Go
  • Loading branch information
bcicen authored Apr 4, 2020
2 parents 0b70f6e + 56e0a4b commit 111a47c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ type Config struct {
DefaultChannel string `toml:"default_channel"`
}

// Return new default config
// NewConfig returns new default config
func NewConfig() *Config {
return &Config{
Teams: make(map[string]string),
}
}

// Return config read from file
// ReadConfig returns config read from file
func ReadConfig(path string) *Config {
config := NewConfig()
lines, err := readLines(path)
Expand Down
2 changes: 1 addition & 1 deletion queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (q *StreamQ) Add(line string) {
q.lock.Unlock()
}

// return all lines in queue
// Flush returns all lines in queue
func (q *StreamQ) Flush() []string {
q.lock.Lock()
defer q.lock.Unlock()
Expand Down

0 comments on commit 111a47c

Please sign in to comment.