package big
import (
- "errors"
"fmt"
"io"
"math/rand"
}
b := buf[0]
if b>>1 != intGobVersion {
- return errors.New(fmt.Sprintf("Int.GobDecode: encoding version %d not supported", b>>1))
+ return fmt.Errorf("Int.GobDecode: encoding version %d not supported", b>>1)
}
z.neg = b&1 != 0
z.abs = z.abs.setBytes(buf[1:])
}
b := buf[0]
if b>>1 != ratGobVersion {
- return errors.New(fmt.Sprintf("Rat.GobDecode: encoding version %d not supported", b>>1))
+ return fmt.Errorf("Rat.GobDecode: encoding version %d not supported", b>>1)
}
const j = 1 + 4
i := j + binary.BigEndian.Uint32(buf[j-4:j])
package big
import (
- "errors"
"fmt"
"io"
"math/rand"
}
b := buf[0]
if b>>1 != intGobVersion {
- return errors.New(fmt.Sprintf("Int.GobDecode: encoding version %d not supported", b>>1))
+ return fmt.Errorf("Int.GobDecode: encoding version %d not supported", b>>1)
}
z.neg = b&1 != 0
z.abs = z.abs.setBytes(buf[1:])
}
b := buf[0]
if b>>1 != ratGobVersion {
- return errors.New(fmt.Sprintf("Rat.GobDecode: encoding version %d not supported", b>>1))
+ return fmt.Errorf("Rat.GobDecode: encoding version %d not supported", b>>1)
}
const j = 1 + 4
i := j + binary.BigEndian.Uint32(buf[j-4:j])
}
resp.Body.Close()
if urlStr = resp.Header.Get("Location"); urlStr == "" {
- err = errors.New(fmt.Sprintf("%d response missing Location header", resp.StatusCode))
+ err = fmt.Errorf("%d response missing Location header", resp.StatusCode)
break
}
base = req.URL