kubenetworks/kubevpn

View on GitHub
pkg/syncthing/api.go

Summary

Maintainability
A
35 mins
Test Coverage

Method Client.Call has 5 return statements (exceeds 4 allowed).
Open

func (c *Client) Call(ctx context.Context, uri, method string, body []byte) ([]byte, error) {
    var url = path.Join(c.GUIAddress, uri)
    req, err := http.NewRequest(method, fmt.Sprintf("http://%s", url), bytes.NewBuffer(body))
    if err != nil {
        return nil, fmt.Errorf("failed to initialize syncthing API request: %w", err)
Severity: Major
Found in pkg/syncthing/api.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status