Commit 06a795e4 authored by Daniel Martí's avatar Daniel Martí Committed by Robert Griesemer

go/types: use consistent receiver names

Inconsistent names are quite obvious on the godoc HTML rendering:

	type Array
	    func NewArray(elem Type, len int64) *Array
	    func (a *Array) Elem() Type
	    func (a *Array) Len() int64
	    func (t *Array) String() string
	    func (t *Array) Underlying() Type

Fix all the String and Underlying methods to be consistent with their
types. This makes these two lists of methods less consistent, but that's
not visible to the user.

This also makes the inconsistent receiver names rule in golint happy.

Change-Id: I7c84d6bae1235887233a70d5f7f61a224106e952
Reviewed-on: https://go-review.googlesource.com/91736Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
parent 945872e5
......@@ -438,26 +438,26 @@ func (t *Named) AddMethod(m *Func) {
// Implementations for Type methods.
func (t *Basic) Underlying() Type { return t }
func (t *Array) Underlying() Type { return t }
func (t *Slice) Underlying() Type { return t }
func (t *Struct) Underlying() Type { return t }
func (t *Pointer) Underlying() Type { return t }
func (b *Basic) Underlying() Type { return b }
func (a *Array) Underlying() Type { return a }
func (s *Slice) Underlying() Type { return s }
func (s *Struct) Underlying() Type { return s }
func (p *Pointer) Underlying() Type { return p }
func (t *Tuple) Underlying() Type { return t }
func (t *Signature) Underlying() Type { return t }
func (s *Signature) Underlying() Type { return s }
func (t *Interface) Underlying() Type { return t }
func (t *Map) Underlying() Type { return t }
func (t *Chan) Underlying() Type { return t }
func (m *Map) Underlying() Type { return m }
func (c *Chan) Underlying() Type { return c }
func (t *Named) Underlying() Type { return t.underlying }
func (t *Basic) String() string { return TypeString(t, nil) }
func (t *Array) String() string { return TypeString(t, nil) }
func (t *Slice) String() string { return TypeString(t, nil) }
func (t *Struct) String() string { return TypeString(t, nil) }
func (t *Pointer) String() string { return TypeString(t, nil) }
func (b *Basic) String() string { return TypeString(b, nil) }
func (a *Array) String() string { return TypeString(a, nil) }
func (s *Slice) String() string { return TypeString(s, nil) }
func (s *Struct) String() string { return TypeString(s, nil) }
func (p *Pointer) String() string { return TypeString(p, nil) }
func (t *Tuple) String() string { return TypeString(t, nil) }
func (t *Signature) String() string { return TypeString(t, nil) }
func (s *Signature) String() string { return TypeString(s, nil) }
func (t *Interface) String() string { return TypeString(t, nil) }
func (t *Map) String() string { return TypeString(t, nil) }
func (t *Chan) String() string { return TypeString(t, nil) }
func (m *Map) String() string { return TypeString(m, nil) }
func (c *Chan) String() string { return TypeString(c, nil) }
func (t *Named) String() string { return TypeString(t, nil) }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment