timoth-y/kicksware-api

View on GitHub
shared/api/rest/innerServiceCommunicator.go

Summary

Maintainability
A
1 hr
Test Coverage

Method communicator.PostMessage has 7 return statements (exceeds 4 allowed).
Open

func (c *communicator) PostMessage(endpoint string, query interface{}, response interface{}, params ...*meta.RequestParams) error {
    url := fmt.Sprintf(c.endpointFormat, endpoint)
    body, err := json.Marshal(query); if err != nil {
        return err
    }
Severity: Major
Found in shared/api/rest/innerServiceCommunicator.go - About 45 mins to fix

    Method communicator.GetMessage has 6 return statements (exceeds 4 allowed).
    Open

    func (c *communicator) GetMessage(endpoint string, response interface{}, params ...*meta.RequestParams) error {
        url := fmt.Sprintf(c.endpointFormat, endpoint)
        req, err := http.NewRequest("GET", url, nil); if err != nil {
            return err
        }
    Severity: Major
    Found in shared/api/rest/innerServiceCommunicator.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status