Debian Codegraph @

src/cmd/fix/context.go

raw
1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package main
6
7 import (
8 "go/ast"
9 )
10
11 func init() {
12 register(contextFix)
13 }
14
15 var contextFix = fix{
16 name: "context",
17 date: "2016-09-09",
18 f: ctxfix,
19 desc: `Change imports of golang.org/x/net/context to context`,
20 disabled: false,
21 }
22
23 func ctxfix(f *ast.File) bool {
24 return rewriteImport(f, "golang.org/x/net/context", "context")
25 }