]> Cypherpunks repositories - gostls13.git/commitdiff
gofmt'ed more stragglers
authorRobert Griesemer <gri@golang.org>
Fri, 6 Nov 2009 02:26:16 +0000 (18:26 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 6 Nov 2009 02:26:16 +0000 (18:26 -0800)
R=rsc
http://go/go-review/1019004

src/pkg/strconv/decimal_test.go
src/pkg/testing/regexp.go
src/pkg/testing/script/script.go
src/pkg/unicode/maketables.go
src/pkg/xml/xml.go

index 31477f1aa53a887d5300a00923e0adab1f668313..1ac4d5e2738cce0be3e263c0559050708117799f 100644 (file)
@@ -21,7 +21,7 @@ var shifttests = []shiftTest{
        shiftTest{1, 100, "1267650600228229401496703205376"},
        shiftTest{1, -100,
                "0.00000000000000000000000000000078886090522101180541"
-               "17285652827862296732064351090230047702789306640625",
+                       "17285652827862296732064351090230047702789306640625",
        },
        shiftTest{12345678, 8, "3160493568"},
        shiftTest{12345678, -8, "48225.3046875"},
index 25eccdb07baee1e609d0ea565cd378eec8f8bdb7..a91ae4dbb4b41f79d67479f5692579082e4328f8 100644 (file)
@@ -76,7 +76,7 @@ func (c *common) setIndex(i int) {
 // The representation of a compiled regular expression.
 // The public interface is entirely through methods.
 type Regexp struct {
-       expr    string;         // the original expression
+       expr    string; // the original expression
        inst    []instr;
        start   instr;
        nbra    int;    // number of brackets in expression, for subexpressions
@@ -440,7 +440,7 @@ func (p *parser) term() (start, end instr) {
        // The other functions (closure(), concatenation() etc.) assume
        // it's safe to recur to here.
        if p.error != "" {
-               return
+               return;
        }
        switch c := p.c(); c {
        case '|', endOfFile:
@@ -473,7 +473,7 @@ func (p *parser) term() (start, end instr) {
                p.nextc();
                start = p.charClass();
                if p.error != "" {
-                       return
+                       return;
                }
                if p.c() != ']' {
                        p.error = ErrUnmatchedLbkt;
@@ -580,7 +580,7 @@ func (p *parser) concatenation() (start, end instr) {
        for {
                nstart, nend := p.closure();
                if p.error != "" {
-                       return
+                       return;
                }
                switch {
                case nstart == nil:     // end of this concatenation
@@ -602,7 +602,7 @@ func (p *parser) concatenation() (start, end instr) {
 func (p *parser) regexp() (start, end instr) {
        start, end = p.concatenation();
        if p.error != "" {
-               return
+               return;
        }
        for {
                switch p.c() {
@@ -612,7 +612,7 @@ func (p *parser) regexp() (start, end instr) {
                        p.nextc();
                        nstart, nend := p.concatenation();
                        if p.error != "" {
-                               return
+                               return;
                        }
                        alt := new(_Alt);
                        p.re.add(alt);
@@ -700,7 +700,7 @@ func addState(s []state, inst instr, match []int) []state {
        // go in order correctly and this "earlier" test is never necessary,
        for i := 0; i < l; i++ {
                if s[i].inst.index() == index &&        // same instruction
-                                                       s[i].match[0] < pos {   // earlier match already going; lefmost wins
+                       s[i].match[0] < pos {   // earlier match already going; lefmost wins
                        return s;
                }
        }
@@ -801,8 +801,8 @@ func (re *Regexp) doExecute(str string, bytes []byte, pos int) []int {
                        case _END:
                                // choose leftmost longest
                                if !found ||    // first
-                                               st.match[0] < final.match[0] ||                                 // leftmost
-                                               (st.match[0] == final.match[0] && pos > final.match[1]) {       // longest
+                                       st.match[0] < final.match[0] || // leftmost
+                                       (st.match[0] == final.match[0] && pos > final.match[1]) {       // longest
                                        final = st;
                                        final.match[1] = pos;
                                }
index 71e7cdca4db508d7795fbf56a71ed4277aaf128d..65ccb09dd9303971f8d02f9321fce0a75ce904b3 100644 (file)
@@ -195,8 +195,8 @@ func (s Close) send() {
 // A ReceivedUnexpected error results if no active Events match a value
 // received from a channel.
 type ReceivedUnexpected struct {
-       Value interface{};
-       ready []*Event;
+       Value   interface{};
+       ready   []*Event;
 }
 
 func (r ReceivedUnexpected) String() string {
index 863678b8be5915a2e2d1584997c4b2ce4dda2e98..c310ef071dac0f062b7064a4f815bf6fd516ebf8 100644 (file)
@@ -314,9 +314,9 @@ func printCategories() {
        }
        fmt.Printf(
                "// Generated by running\n"
-               "//     maketables --tables=%s --data=%s\n"
-               "// DO NOT EDIT\n\n"
-               "package unicode\n\n",
+                       "//     maketables --tables=%s --data=%s\n"
+                       "// DO NOT EDIT\n\n"
+                       "package unicode\n\n",
                *tablelist,
                *dataUrl);
 
@@ -591,8 +591,8 @@ func printScriptOrProperty(doProps bool) {
 
        fmt.Printf(
                "// Generated by running\n"
-               "//     maketables --%s=%s --url=%s\n"
-               "// DO NOT EDIT\n\n",
+                       "//     maketables --%s=%s --url=%s\n"
+                       "// DO NOT EDIT\n\n",
                flag,
                flaglist,
                *url);
@@ -778,12 +778,12 @@ func printCases() {
        }
        fmt.Printf(
                "// Generated by running\n"
-               "//     maketables --data=%s\n"
-               "// DO NOT EDIT\n\n"
-               "// CaseRanges is the table describing case mappings for all letters with\n"
-               "// non-self mappings.\n"
-               "var CaseRanges = _CaseRanges\n"
-               "var _CaseRanges = []CaseRange {\n",
+                       "//     maketables --data=%s\n"
+                       "// DO NOT EDIT\n\n"
+                       "// CaseRanges is the table describing case mappings for all letters with\n"
+                       "// non-self mappings.\n"
+                       "var CaseRanges = _CaseRanges\n"
+                       "var _CaseRanges = []CaseRange {\n",
                *dataUrl);
 
        var startState *caseState;      // the start of a run; nil for not active
index d73ebdc2ae61700205317c402adeb36c5f716478..2f33f2d85d876304e47b3a6cabcfe5e4121b2049 100644 (file)
@@ -475,7 +475,7 @@ func (p *Parser) RawToken() (Token, os.Error) {
                }
                switch b {
                case '-':       // <!-
-                               // Probably <!-- for a comment.
+                       // Probably <!-- for a comment.
                        if b, ok = p.getc(); !ok {
                                return nil, p.err;
                        }
@@ -504,7 +504,7 @@ func (p *Parser) RawToken() (Token, os.Error) {
                        return Comment(data), nil;
 
                case '[':       // <![
-                               // Probably <![CDATA[.
+                       // Probably <![CDATA[.
                        for i := 0; i < 7; i++ {
                                if b, ok = p.getc(); !ok {
                                        return nil, p.err;
@@ -1187,15 +1187,15 @@ var second = []unicode.Range{
 // standard HTML entity characters.
 var HTMLEntity = htmlEntity
 
-var htmlEntity = map[string]string {
-/*
-       hget http://www.w3.org/TR/html4/sgml/entities.html |
-       ssam '
-               ,y /\&gt;/ x/\&lt;(.|\n)+/ s/\n/ /g
-               ,x v/^\&lt;!ENTITY/d
-               ,s/\&lt;!ENTITY ([^ ]+) .*U\+([0-9A-F][0-9A-F][0-9A-F][0-9A-F]) .+/     "\1": "\\u\2",/g
-       '
-*/
+var htmlEntity = map[string]string{
+       /*
+               hget http://www.w3.org/TR/html4/sgml/entities.html |
+               ssam '
+                       ,y /\&gt;/ x/\&lt;(.|\n)+/ s/\n/ /g
+                       ,x v/^\&lt;!ENTITY/d
+                       ,s/\&lt;!ENTITY ([^ ]+) .*U\+([0-9A-F][0-9A-F][0-9A-F][0-9A-F]) .+/     "\1": "\\u\2",/g
+               '
+       */
        "nbsp": "\u00A0",
        "iexcl": "\u00A1",
        "cent": "\u00A2",
@@ -1454,11 +1454,11 @@ var htmlEntity = map[string]string {
 // should be considered to close automatically.
 var HTMLAutoClose = htmlAutoClose
 
-var htmlAutoClose = []string {
-/*
-       hget http://www.w3.org/TR/html4/loose.dtd |
-       9 sed -n 's/<!ELEMENT (.*) - O EMPTY.+/ "\1",/p' | tr A-Z a-z
-*/
+var htmlAutoClose = []string{
+       /*
+               hget http://www.w3.org/TR/html4/loose.dtd |
+               9 sed -n 's/<!ELEMENT (.*) - O EMPTY.+/ "\1",/p' | tr A-Z a-z
+       */
        "basefont",
        "br",
        "area",