Update golang.org/x/net/context to latest.

```
$ gvt delete golang.org/x/net/context
$ gvt fetch golang.org/x/net/context
2017/10/08 XX:XX:XX Fetching: golang.org/x/net/context
$ git grep -l "golang.org/x/net/context" | grep -v vendor | xargs sed -i 's:golang.org/x/net/context:context:g'
$ git grep -l "context/ctxhttp" | grep -v vendor | xargs sed -i 's:context/ctxhttp:golang.org/x/net/context/ctxhttp:g'
$ gofmt -s -w app
$ gofmt -s -w common
$ gofmt -s -w probe
$ gofmt -s -w prog
$ gofmt -s -w tools
```

This fixes errors like:
```
app/multitenant/aws_collector.go:222: cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error in argument to instrument.TimeRequestHistogram
app/multitenant/aws_collector.go:439: cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error in argument to instrument.TimeRequestHistogram
app/multitenant/memcache_client.go:155: cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error in argument to instrument.TimeRequestHistogramStatus
app/multitenant/memcache_client.go:210: cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error in argument to instrument.TimeRequestHistogramStatus
app/multitenant/s3_client.go:74: cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error in argument to instrument.TimeRequestHistogram
app/multitenant/s3_client.go:91: cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error in argument to instrument.TimeRequestHistogram
app/multitenant/sqs_control_router.go:99: cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error in argument to instrument.TimeRequestHistogram
app/multitenant/sqs_control_router.go:133: cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error in argument to instrument.TimeRequestHistogram
app/multitenant/sqs_control_router.go:163: cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error in argument to instrument.TimeRequestHistogram
app/multitenant/sqs_control_router.go:199: cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error in argument to instrument.TimeRequestHistogram
app/multitenant/sqs_control_router.go:199: too many errors
```
This commit is contained in:
Marc CARRE
2017-10-08 15:00:34 +01:00
parent 6c709157c3
commit c7a2117293
37 changed files with 730 additions and 1163 deletions

View File

@@ -4,7 +4,7 @@ import (
"net/http"
"time"
"golang.org/x/net/context"
"context"
"github.com/weaveworks/scope/probe/host"
"github.com/weaveworks/scope/report"

View File

@@ -1,6 +1,7 @@
package app
import (
"context"
"fmt"
"net/http"
"net/url"
@@ -11,7 +12,6 @@ import (
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/probe/kubernetes"

View File

@@ -1,12 +1,12 @@
package app
import (
"context"
"net/http"
"time"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
"github.com/weaveworks/scope/common/xfer"
"github.com/weaveworks/scope/render"

View File

@@ -7,7 +7,7 @@ import (
"testing"
"time"
"golang.org/x/net/context"
"context"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/report"

View File

@@ -9,7 +9,7 @@ import (
"sync"
"time"
"golang.org/x/net/context"
"context"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/report"

View File

@@ -4,7 +4,7 @@ import (
"testing"
"time"
"golang.org/x/net/context"
"context"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/common/test"

View File

@@ -5,7 +5,7 @@ import (
"math/rand"
"sync"
"golang.org/x/net/context"
"context"
"github.com/weaveworks/scope/common/xfer"
)

View File

@@ -4,10 +4,10 @@ import (
"net/http"
"net/rpc"
"context"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
"github.com/ugorji/go/codec"
"golang.org/x/net/context"
"github.com/weaveworks/scope/common/xfer"
)

View File

@@ -1,6 +1,7 @@
package multitenant
import (
"context"
"crypto/md5"
"fmt"
"io"
@@ -16,7 +17,6 @@ import (
"github.com/nats-io/nats"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
"github.com/weaveworks/common/instrument"
"github.com/weaveworks/scope/app"

View File

@@ -7,9 +7,9 @@ import (
"strings"
"time"
"context"
log "github.com/sirupsen/logrus"
billing "github.com/weaveworks/billing-client"
"golang.org/x/net/context"
"github.com/weaveworks/scope/app"
"github.com/weaveworks/scope/report"

View File

@@ -1,6 +1,7 @@
package multitenant
import (
"context"
"fmt"
"io"
"net/http"
@@ -10,8 +11,8 @@ import (
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/app"

View File

@@ -9,7 +9,7 @@ import (
"sync"
"testing"
"golang.org/x/net/context"
"context"
"github.com/weaveworks/scope/app"
"github.com/weaveworks/scope/common/xfer"

View File

@@ -1,6 +1,7 @@
package multitenant
import (
"context"
"fmt"
"net"
"sort"
@@ -9,8 +10,8 @@ import (
"github.com/bradfitz/gomemcache/memcache"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
"github.com/weaveworks/common/instrument"
"github.com/weaveworks/scope/report"

View File

@@ -3,11 +3,11 @@ package multitenant
import (
"bytes"
"context"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/net/context"
"github.com/weaveworks/common/instrument"
"github.com/weaveworks/scope/report"

View File

@@ -2,6 +2,7 @@ package multitenant
import (
"bytes"
"context"
"encoding/json"
"fmt"
"math/rand"
@@ -12,8 +13,8 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sqs"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
"github.com/weaveworks/common/instrument"
"github.com/weaveworks/scope/app"

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"net/http"
"golang.org/x/net/context"
"context"
"github.com/weaveworks/scope/app"
)

View File

@@ -6,8 +6,8 @@ import (
"sync"
"time"
"context"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/common/xfer"

View File

@@ -1,11 +1,11 @@
package app
import (
"context"
"net/http"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
"github.com/weaveworks/scope/common/xfer"
)

View File

@@ -11,9 +11,9 @@ import (
"testing"
"time"
"context"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"golang.org/x/net/context"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/common/xfer"

View File

@@ -11,11 +11,11 @@ import (
"sync"
"time"
"context"
"github.com/PuerkitoBio/ghost/handlers"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
"github.com/ugorji/go/codec"
"golang.org/x/net/context"
"github.com/weaveworks/scope/common/hostname"
"github.com/weaveworks/scope/common/xfer"

View File

@@ -9,9 +9,9 @@ import (
"testing"
"time"
"context"
"github.com/gorilla/mux"
"github.com/ugorji/go/codec"
"golang.org/x/net/context"
"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/app"