brokeyourbike/lets-go-chat

View on GitHub
api/handlers/chat.go

Summary

Maintainability
A
1 hr
Test Coverage
F
25%

Method Chat.HandleChat has 51 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (c *Chat) HandleChat(w http.ResponseWriter, r *http.Request, params server.WsRTMStartParams) {
    t, err := uuid.Parse(params.Token)
    if err != nil {
        http.Error(w, "Token format invalid", http.StatusBadRequest)
        return
Severity: Minor
Found in api/handlers/chat.go - About 1 hr to fix

    Method Chat.HandleChat has 7 return statements (exceeds 4 allowed).
    Open

    func (c *Chat) HandleChat(w http.ResponseWriter, r *http.Request, params server.WsRTMStartParams) {
        t, err := uuid.Parse(params.Token)
        if err != nil {
            http.Error(w, "Token format invalid", http.StatusBadRequest)
            return
    Severity: Major
    Found in api/handlers/chat.go - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status