From b6eef48120953c8b90400974e90255c64dace0f2 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 7 Jan 2014 10:03:15 -0800 Subject: [PATCH] go.tools/go/types: adjust comments for godoc R=adonovan CC=golang-codereviews https://golang.org/cl/38560045 --- go/types/selection.go | 16 ++++++++-------- go/types/sizes.go | 14 +++++++------- go/types/typestring.go | 13 ++++++------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/go/types/selection.go b/go/types/selection.go index 26f39c5b..19303df1 100644 --- a/go/types/selection.go +++ b/go/types/selection.go @@ -24,19 +24,19 @@ const ( // A Selection describes a selector expression x.f. // For the declarations: // -// type T struct{ x int; E } -// type E struct{} -// func (e E) m() {} -// var p *T +// type T struct{ x int; E } +// type E struct{} +// func (e E) m() {} +// var p *T // // the following relations exist: // // Selector Kind Recv Obj Type Index Indirect // -// p.x FieldVal T x int {0} true -// p.m MethodVal *T m func (e *T) m() {1, 0} true -// T.m MethodExpr T m func m(_ T) {1, 0} false -// math.Pi PackageObj nil Pi untyped numeric nil false +// p.x FieldVal T x int {0} true +// p.m MethodVal *T m func (e *T) m() {1, 0} true +// T.m MethodExpr T m func m(_ T) {1, 0} false +// math.Pi PackageObj nil Pi untyped numeric nil false // type Selection struct { kind SelectionKind diff --git a/go/types/sizes.go b/go/types/sizes.go index fc274818..3464bb5e 100644 --- a/go/types/sizes.go +++ b/go/types/sizes.go @@ -24,13 +24,13 @@ type Sizes interface { // StdSizes is a convenience type for creating commonly used Sizes. // It makes the following simplifying assumptions: // -// - The size of explicitly sized basic types (int16, etc.) is the -// specified size. -// - The size of strings, functions, and interfaces is 2*WordSize. -// - The size of slices is 3*WordSize. -// - All other types have size WordSize. -// - Arrays and structs are aligned per spec definition; all other -// types are naturally aligned with a maximum alignment MaxAlign. +// - The size of explicitly sized basic types (int16, etc.) is the +// specified size. +// - The size of strings, functions, and interfaces is 2*WordSize. +// - The size of slices is 3*WordSize. +// - All other types have size WordSize. +// - Arrays and structs are aligned per spec definition; all other +// types are naturally aligned with a maximum alignment MaxAlign. // // *StdSizes implements Sizes. // diff --git a/go/types/typestring.go b/go/types/typestring.go index 03de10a9..3d01b6c4 100644 --- a/go/types/typestring.go +++ b/go/types/typestring.go @@ -14,18 +14,17 @@ import ( // If GcCompatibilityMode is set, printing of types is modified // to match the representation of some types in the gc compiler: // -// - byte and rune lose their alias name and simply stand for -// uint8 and int32 respectively -// -// - embedded interfaces get flattened (the embedding info is lost, -// and certain recursive interface types cannot be printed anymore) +// - byte and rune lose their alias name and simply stand for +// uint8 and int32 respectively +// - embedded interfaces get flattened (the embedding info is lost, +// and certain recursive interface types cannot be printed anymore) // // This makes it easier to compare packages computed with the type- // checker vs packages imported from gc export data. // // Caution: This flag affects all uses of WriteType, globally. -// It is only provided for testing in conjunction with -// gc-generated data. It may be removed at any time. +// It is only provided for testing in conjunction with +// gc-generated data. It may be removed at any time. var GcCompatibilityMode bool // TypeString returns the string representation of typ.