diff options
| author | Robert Griesemer <gri@golang.org> | 2009-11-09 12:07:39 -0800 | 
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2009-11-09 12:07:39 -0800 | 
| commit | e940edc7a026293153ba09ece40e8092a2fc2463 (patch) | |
| tree | c94a425c84b7a48f91a5d76a222effad70c9a88c /src/cmd/godoc/snippet.go | |
| parent | e067f862f1774ab89a2096a88571a94e3b9cd353 (diff) | |
| download | golang-e940edc7a026293153ba09ece40e8092a2fc2463.tar.gz | |
remove semis after statements in one-statement statement lists
R=rsc, r
http://go/go-review/1025029
Diffstat (limited to 'src/cmd/godoc/snippet.go')
| -rwxr-xr-x | src/cmd/godoc/snippet.go | 20 | 
1 files changed, 10 insertions, 10 deletions
| diff --git a/src/cmd/godoc/snippet.go b/src/cmd/godoc/snippet.go index b6f64462a..be027ffc8 100755 --- a/src/cmd/godoc/snippet.go +++ b/src/cmd/godoc/snippet.go @@ -31,14 +31,14 @@ type snippetStyler struct {  func (s *snippetStyler) LineTag(line int) (text []uint8, tag printer.HTMLTag) { -	return;	// no LineTag for snippets +	return	// no LineTag for snippets  }  func (s *snippetStyler) Ident(id *ast.Ident) (text []byte, tag printer.HTMLTag) {  	text = strings.Bytes(id.Value);  	if s.highlight == id { -		tag = printer.HTMLTag{"<span class=highlight>", "</span>"}; +		tag = printer.HTMLTag{"<span class=highlight>", "</span>"}  	}  	return;  } @@ -56,17 +56,17 @@ func findSpec(list []ast.Spec, id *ast.Ident) ast.Spec {  		switch s := spec.(type) {  		case *ast.ImportSpec:  			if s.Name == id { -				return s; +				return s  			}  		case *ast.ValueSpec:  			for _, n := range s.Names {  				if n == id { -					return s; +					return s  				}  			}  		case *ast.TypeSpec:  			if s.Name == id { -				return s; +				return s  			}  		}  	} @@ -77,7 +77,7 @@ func findSpec(list []ast.Spec, id *ast.Ident) ast.Spec {  func genSnippet(d *ast.GenDecl, id *ast.Ident) *Snippet {  	s := findSpec(d.Specs, id);  	if s == nil { -		return nil;	//  declaration doesn't contain id - exit gracefully +		return nil	//  declaration doesn't contain id - exit gracefully  	}  	// only use the spec containing the id for the snippet @@ -89,7 +89,7 @@ func genSnippet(d *ast.GenDecl, id *ast.Ident) *Snippet {  func funcSnippet(d *ast.FuncDecl, id *ast.Ident) *Snippet {  	if d.Name != id { -		return nil;	//  declaration doesn't contain id - exit gracefully +		return nil	//  declaration doesn't contain id - exit gracefully  	}  	// only use the function signature for the snippet @@ -106,9 +106,9 @@ func funcSnippet(d *ast.FuncDecl, id *ast.Ident) *Snippet {  func NewSnippet(decl ast.Decl, id *ast.Ident) (s *Snippet) {  	switch d := decl.(type) {  	case *ast.GenDecl: -		s = genSnippet(d, id); +		s = genSnippet(d, id)  	case *ast.FuncDecl: -		s = funcSnippet(d, id); +		s = funcSnippet(d, id)  	}  	// handle failure gracefully @@ -116,7 +116,7 @@ func NewSnippet(decl ast.Decl, id *ast.Ident) (s *Snippet) {  		s = &Snippet{  			id.Pos().Line,  			fmt.Sprintf(`could not generate a snippet for <span class="highlight">%s</span>`, id.Value), -		}; +		}  	}  	return;  } | 
