Apply gofmt

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd) 2022-12-14 11:40:43 +00:00
parent 3bafff7e09
commit f3599f4699
5 changed files with 50 additions and 49 deletions

View File

@ -11,7 +11,7 @@
// programmers to add context to the failure path in their code in a way
// that does not destroy the original value of the error.
//
// Adding context to an error
// # Adding context to an error
//
// The errors.Wrap function returns a new error that adds context to the
// original error by recording a stack trace at the point Wrap is called,
@ -27,7 +27,7 @@
// operations: annotating an error with a stack trace and with a message,
// respectively.
//
// Retrieving the cause of an error
// # Retrieving the cause of an error
//
// Using errors.Wrap constructs a stack of errors, adding context to the
// preceding error. Depending on the nature of the error it may be necessary
@ -52,7 +52,7 @@
// Although the causer interface is not exported by this package, it is
// considered a part of its stable public interface.
//
// Formatted printing of errors
// # Formatted printing of errors
//
// All error values returned from this package implement fmt.Formatter and can
// be formatted by the fmt package. The following verbs are supported:
@ -63,7 +63,7 @@
// %+v extended format. Each Frame of the error's StackTrace will
// be printed in detail.
//
// Retrieving the stack trace of an error or wrapper
// # Retrieving the stack trace of an error or wrapper
//
// New, Errorf, Wrap, and Wrapf record a stack trace at the point they are
// invoked. This information can be retrieved with the following interface:

View File

@ -1,3 +1,4 @@
//go:build go1.13
// +build go1.13
package errors

View File

@ -5,7 +5,7 @@ package handlers
import "net/http"
//HealthzHandler healthz hanlder for mertics server
// HealthzHandler healthz hanlder for mertics server
func HealthzHandler(w http.ResponseWriter, r *http.Request) {
switch r.Method {

View File

@ -278,7 +278,7 @@ func main() {
log.Fatal(s.ListenAndServe())
}
//runMetricsServer Listen on a separate HTTP port for Prometheus metrics to keep this accessible from
// runMetricsServer Listen on a separate HTTP port for Prometheus metrics to keep this accessible from
// the internal network only.
func runMetricsServer() {
metricsHandler := metrics.PrometheusHandler()