diff options
Diffstat (limited to 'utilities/utilities.go')
| -rw-r--r-- | utilities/utilities.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/utilities/utilities.go b/utilities/utilities.go index 337aa5e..c74e99b 100644 --- a/utilities/utilities.go +++ b/utilities/utilities.go @@ -25,7 +25,8 @@ import ( ) func IsInterfaceNil(ifc interface{}) bool { - return ifc == nil || (reflect.ValueOf(ifc).Kind() == reflect.Ptr && reflect.ValueOf(ifc).IsNil()) + return ifc == nil || + (reflect.ValueOf(ifc).Kind() == reflect.Ptr && reflect.ValueOf(ifc).IsNil()) } func SignedPercentDifference(current float64, previous float64) (difference float64) { @@ -56,7 +57,12 @@ type GetLatency struct { Err error } -func CalculateSequentialRTTsTime(ctx context.Context, client_a *http.Client, client_b *http.Client, url string) chan GetLatency { +func CalculateSequentialRTTsTime( + ctx context.Context, + client_a *http.Client, + client_b *http.Client, + url string, +) chan GetLatency { responseChannel := make(chan GetLatency) go func() { before := time.Now() |
