mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-18 21:09:38 +00:00
Upgraded from 99c19923, branch release-3.0. This required fetching or upgrading the following: * k8s.io/api to kubernetes-1.9.1 * k8s.io/apimachinery to kubernetes-1.9.1 * github.com/juju/ratelimit to 1.0.1 * github.com/spf13/pflag to 4c012f6d Also, update Scope's imports/function calls to be compatible with the new client.
24 lines
495 B
Go
24 lines
495 B
Go
// Copyright 2017 Google Inc. All rights reserved.
|
|
// Use of this source code is governed by the Apache 2.0
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//+build go1.7
|
|
|
|
package delay
|
|
|
|
import (
|
|
stdctx "context"
|
|
"reflect"
|
|
|
|
netctx "golang.org/x/net/context"
|
|
)
|
|
|
|
var (
|
|
stdContextType = reflect.TypeOf((*stdctx.Context)(nil)).Elem()
|
|
netContextType = reflect.TypeOf((*netctx.Context)(nil)).Elem()
|
|
)
|
|
|
|
func isContext(t reflect.Type) bool {
|
|
return t == stdContextType || t == netContextType
|
|
}
|