mirror of https://github.com/golang/go.git
go/analysis/passes/printf: remove unused hasBasicType
Change-Id: Ic1be5931a620e3fd15b58a7acc34d0013f011a20 GitHub-Last-Rev: 32b11c95b8c0715aa13a741913759198ec208942 GitHub-Pull-Request: golang/tools#391 Reviewed-on: https://go-review.googlesource.com/c/tools/+/425834 Run-TryBot: Tim King <taking@google.com> Reviewed-by: David Chase <drchase@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Tim King <taking@google.com>
This commit is contained in:
parent
7f2330708b
commit
717a671622
|
|
@ -299,13 +299,3 @@ func isConvertibleToString(typ types.Type) bool {
|
|||
|
||||
return false
|
||||
}
|
||||
|
||||
// hasBasicType reports whether x's type is a types.Basic with the given kind.
|
||||
func hasBasicType(pass *analysis.Pass, x ast.Expr, kind types.BasicKind) bool {
|
||||
t := pass.TypesInfo.Types[x].Type
|
||||
if t != nil {
|
||||
t = t.Underlying()
|
||||
}
|
||||
b, ok := t.(*types.Basic)
|
||||
return ok && b.Kind() == kind
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue