cmd

package
v0.0.0-...-4d82e29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the application version - either a git SHA or tag value
	Version string

	// Commit is the application commit hash
	Commit string

	// Branch the build branch
	Branch string

	// BuildDate is the date of the build
	BuildDate string
)

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type LoggingResponseWriter

type LoggingResponseWriter struct {
	StatusCode int
	// contains filtered or unexported fields
}

LoggingResponseWriter is a wrapper around an http.ResponseWriter which captures the status code written to the response, so that it can be logged.

func NewLoggingResponseWriter

func NewLoggingResponseWriter(wrapped http.ResponseWriter) *LoggingResponseWriter

NewLoggingResponseWriter creates a new logging response writer

func (*LoggingResponseWriter) Header

func (lrw *LoggingResponseWriter) Header() http.Header

Header returns the header

func (*LoggingResponseWriter) Write

func (lrw *LoggingResponseWriter) Write(content []byte) (int, error)

Write writes the contents

func (*LoggingResponseWriter) WriteHeader

func (lrw *LoggingResponseWriter) WriteHeader(statusCode int)

WriteHeader writes the header

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL