mirror of
https://github.com/golang/go
synced 2024-11-08 11:46:31 -07:00
bf90da97c1
Since these are type aliases in Go 1.9 make rewriting golang.org/x/net/context imports to context the default. Change-Id: Ib7ee58b59ea5463b92e1590c8b8f5c0ef87d310b Reviewed-on: https://go-review.googlesource.com/58590 Reviewed-by: Sameer Ajmani <sameer@golang.org> Run-TryBot: Sam Whited <sam@samwhited.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
26 lines
510 B
Go
26 lines
510 B
Go
// 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
|
|
|
|
import (
|
|
"go/ast"
|
|
)
|
|
|
|
func init() {
|
|
register(contextFix)
|
|
}
|
|
|
|
var contextFix = fix{
|
|
name: "context",
|
|
date: "2016-09-09",
|
|
f: ctxfix,
|
|
desc: `Change imports of golang.org/x/net/context to context`,
|
|
disabled: false,
|
|
}
|
|
|
|
func ctxfix(f *ast.File) bool {
|
|
return rewriteImport(f, "golang.org/x/net/context", "context")
|
|
}
|