howood/imagereductor

View on GitHub
interfaces/handler/imagereductionhandler.go

Summary

Maintainability
A
1 hr
Test Coverage

Method ImageReductionHandler.getCropParam has 5 return statements (exceeds 4 allowed).
Open

func (irh ImageReductionHandler) getCropParam(cropparam string, err error) ([4]int, error) {
    if err != nil {
        return [4]int{}, err
    }
    if cropparam == "" {
Severity: Major
Found in interfaces/handler/imagereductionhandler.go - About 35 mins to fix

    Method ImageReductionHandler.Request has 5 return statements (exceeds 4 allowed).
    Open

    func (irh ImageReductionHandler) Request(c echo.Context) error {
        requesturi := c.Request().URL.RequestURI()
        xRequestID := requestid.GetRequestID(c.Request())
        irh.ctx = context.WithValue(context.Background(), requestid.GetRequestIDKey(), xRequestID)
        log.Info(irh.ctx, "========= START REQUEST : "+requesturi)
    Severity: Major
    Found in interfaces/handler/imagereductionhandler.go - About 35 mins to fix

      Method ImageReductionHandler.Upload has 5 return statements (exceeds 4 allowed).
      Open

      func (irh ImageReductionHandler) Upload(c echo.Context) error {
          xRequestID := requestid.GetRequestID(c.Request())
          irh.ctx = context.WithValue(context.Background(), requestid.GetRequestIDKey(), xRequestID)
          log.Info(irh.ctx, "========= START REQUEST : "+c.Request().URL.RequestURI())
          log.Info(irh.ctx, c.Request().Method)
      Severity: Major
      Found in interfaces/handler/imagereductionhandler.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status