forwarder/forwarder.go
Method Forwarder.HandleRequest
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (f *Forwarder) HandleRequest(w http.ResponseWriter, req *http.Request) {
// Catch panics and return a 500 Internal Server Error
defer func() {
if err := recover(); err != nil {
f.logger.Printf("ERROR %s", err)
Method Forwarder.HandleRequest
has 5 return statements (exceeds 4 allowed). Open
Open
func (f *Forwarder) HandleRequest(w http.ResponseWriter, req *http.Request) {
// Catch panics and return a 500 Internal Server Error
defer func() {
if err := recover(); err != nil {
f.logger.Printf("ERROR %s", err)
if block ends with a return statement, so drop this else and outdent its block Open
Open
} else {
- Exclude checks
comment on exported type Forwarder should be of the form "Forwarder ..." (with optional leading article) Open
Open
/*
- Exclude checks
comment on exported method Forwarder.SetLogger should be of the form "SetLogger ..." Open
Open
/*
- Exclude checks
package comment should be of the form "Package forwarder ..." Open
Open
/*
- Exclude checks
comment on exported function NewForwarder should be of the form "NewForwarder ..." Open
Open
/*
- Exclude checks
package comment should not have leading space Open
Open
/*
- Exclude checks
const applicationUrlHeader should be applicationURLHeader Open
Open
const applicationUrlHeader string = "X-Clammit-Backend"
- Exclude checks
comment on exported type Interceptor should be of the form "Interceptor ..." (with optional leading article) Open
Open
/*
- Exclude checks
comment on exported method Forwarder.HandleRequest should be of the form "HandleRequest ..." Open
Open
/*
- Exclude checks