-
-
Save cristaloleg/98a272880cb140782a6a7c348d8e988c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch arch.Family { | |
// ... ither case clause. | |
case sys.I386: | |
return elf.R_386(nr).String() | |
case sys.MIPS, sys.MIPS64: | |
// return elf.R_MIPS(nr).String() // <- 1 | |
case sys.PPC64: | |
// return elf.R_PPC64(nr).String() // <- 2 | |
case sys.S390X: | |
// return elf.R_390(nr).String() // <- 3 | |
default: | |
panic("unreachable") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- for i := len(ip) - 1; i >= 0; i-- { | |
- v := ip[i] | |
- buf = append(buf, hexDigit[v&0xF]) | |
- buf = append(buf, '.') | |
- buf = append(buf, hexDigit[v>>4]) | |
- buf = append(buf, '.') | |
- } | |
+ for i := len(ip) - 1; i >= 0; i-- { | |
+ v := ip[i] | |
+ buf = append(buf, hexDigit[v&0xF], | |
+ '.', | |
+ hexDigit[v>>4], | |
+ '.') | |
+ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- for _, r := range exports.R { | |
- d.mark(r.Sym, nil) | |
- } | |
+ for i := range exports.R { | |
+ d.mark(exports.R[i].Sym, nil) | |
+ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s := templateName + "$htmltemplate_" + c.state.String() | |
- if c.delim != 0 { | |
+ if c.delim != delimNone { | |
s += "_" + c.delim.String() | |
} | |
- if c.urlPart != 0 { | |
+ if c.urlPart != urlPartNone { | |
s += "_" + c.urlPart.String() | |
} | |
- if c.jsCtx != 0 { | |
+ if c.jsCtx != jsCtxRegexp { | |
s += "_" + c.jsCtx.String() | |
} | |
- if c.attr != 0 { | |
+ if c.attr != attrNone { | |
s += "_" + c.attr.String() | |
} | |
- if c.element != 0 { | |
+ if c.element != elementNone { | |
s += "_" + c.element.String() | |
} | |
return s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment