mirror of
https://github.com/golang/go
synced 2024-11-18 22:14:56 -07:00
3a0c4deef1
Guide to changes: - The -printfuncs flag is renamed -printf.funcs. It no longer supports "pkg.T.f" form, requiring instead "(dir/pkg.T).f" or "(*dir/pkg.T).f". The legacy ":%d" suffix is no longer supported. - (*testing.T).Errorf and friends are removed from the isPrint map because they are discovered by induction while analyzing package "testing". - localPrintfLike map operations are replaced by the Fact mechanism. - The go/types representation is used instead of strings/ast.Nodes in various places. For example: pkgpath, name string -> *types.Func (to identify a function) format, args *ast.Field -> *types.Var (to identify format/args params) This was required to fix a latent bug in maybePrintfWrapper's handling of format string parameters` declared using "factored" syntax, such as: func f(foo, format string, args...interface{}). See L253 of the original testdata file for a testcase that ensured the buggy (?) behavior. - func printfLike is removed as it was deadcode. - isFormatter is rewritten to avoid a global variable. - "if verbose { warn }" is replaced by "if false { report }" for now. - recursive stringer is rewritten more simply in term of go/types. Change-Id: Ia6ee827117b611c686e38207916a21fe1fc296e2 Reviewed-on: https://go-review.googlesource.com/c/142239 Reviewed-by: Michael Matloob <matloob@golang.org> |
||
---|---|---|
.. | ||
objectpath | ||
typeutil |