From d669b6d3e4f3a28e07e2dabd9a8cef9c10327631 Mon Sep 17 00:00:00 2001 From: CodeLingo Team <48107184+CodeLingoTeam@users.noreply.github.com> Date: Wed, 7 Aug 2019 05:27:12 +1200 Subject: [PATCH] Fix function comments based on best practices from Effective Go (#428) Signed-off-by: CodeLingo Bot --- history.go | 4 ++-- main.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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") -- 2.25.1