}
x := 0
for ; i < len(b) && isDigit(b[i]); i++ {
- x = x*10 + int(b[i])-'0'
+ x = x*10 + int(b[i]) - '0'
}
return x, i
}
so it's easy to build them during initialization.
</p>
<pre>
-var timeZone = map[string] int {
+var timeZone = map[string]int{
"UTC": 0*60*60,
"EST": -5*60*60,
"CST": -6*60*60,
test it by simple indexing.
</p>
<pre>
-attended := map[string] bool {
+attended := map[string]bool{
"Ann": true,
"Joe": true,
...
</p>
<pre>
-if pos==0 {
+if pos == 0 {
re.error("'*' illegal at start of expression")
}
</pre>