From: CodeLingo Team <48107184+CodeLingoTeam@users.noreply.github.com> Date: Tue, 6 Aug 2019 17:27:12 +0000 (+1200) Subject: Fix function comments based on best practices from Effective Go (#428) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d669b6d3e4f3a28e07e2dabd9a8cef9c10327631;p=blackbox_exporter.git Fix function comments based on best practices from Effective Go (#428) Signed-off-by: CodeLingo Bot --- diff --git a/history.go b/history.go index d567a4e..52e02c0 100644 --- a/history.go +++ b/history.go @@ -54,7 +54,7 @@ func (rh *resultHistory) Add(moduleName, target, debugOutput string, success boo } } -// Return a list of all results. +// List returns a list of all results. func (rh *resultHistory) List() []*result { rh.mu.Lock() defer rh.mu.Unlock() @@ -62,7 +62,7 @@ func (rh *resultHistory) List() []*result { return rh.results[:] } -// Return a given result. +// Get returns a given result. func (rh *resultHistory) Get(id int64) *result { rh.mu.Lock() defer rh.mu.Unlock() diff --git a/main.go b/main.go index b9f159a..58ba88b 100644 --- a/main.go +++ b/main.go @@ -162,7 +162,7 @@ func (sl scrapeLogger) Log(keyvals ...interface{}) error { return sl.next.Log(kvs...) } -// Returns plaintext debug output for a probe. +// DebugOutput returns plaintext debug output for a probe. func DebugOutput(module *config.Module, logBuffer *bytes.Buffer, registry *prometheus.Registry) string { buf := &bytes.Buffer{} fmt.Fprintf(buf, "Logs for the probe:\n")