1set/starlet

View on GitHub
lib/net/ping.go

Summary

Maintainability
A
1 hr
Test Coverage

Function goPingWrap has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

func goPingWrap(ctx context.Context, address string, count int, timeout, interval time.Duration, pingFunc func(ctx context.Context, address string, timeout time.Duration) (time.Duration, error)) ([]time.Duration, error) {
Severity: Minor
Found in lib/net/ping.go - About 35 mins to fix

    Function starTCPPing has 5 return statements (exceeds 4 allowed).
    Open

    func starTCPPing(thread *starlark.Thread, b *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) {
        var (
            hostname tps.StringOrBytes
            port                    = 80
            count                   = 4
    Severity: Major
    Found in lib/net/ping.go - About 35 mins to fix

      Function httpPingFunc has 5 return statements (exceeds 4 allowed).
      Open

      func httpPingFunc(ctx context.Context, url string, timeout time.Duration) (time.Duration, error) {
          // create a custom http client tracing
          var (
              onceStart, onceDone sync.Once
              connStart           time.Time
      Severity: Major
      Found in lib/net/ping.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status