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 ¶
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
Click to show internal directories.
Click to hide internal directories.