1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| // Copyright 2016 The Go Authors. All rights reserved.
| // Use of this source code is governed by a BSD-style
| // license that can be found in the LICENSE file.
|
| package main
|
| func init() {
| addTestCases(contextTests, ctxfix)
| }
|
| var contextTests = []testCase{
| {
| Name: "context.0",
| In: `package main
|
| import "golang.org/x/net/context"
|
| var _ = "golang.org/x/net/context"
| `,
| Out: `package main
|
| import "context"
|
| var _ = "golang.org/x/net/context"
| `,
| },
| {
| Name: "context.1",
| In: `package main
|
| import ctx "golang.org/x/net/context"
|
| var _ = ctx.Background()
| `,
| Out: `package main
|
| import ctx "context"
|
| var _ = ctx.Background()
| `,
| },
| }
|
|