mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
remove errors.Format
This commit is contained in:
@@ -45,14 +45,14 @@ func (v *KCPConfig) Build() (*serial.TypedMessage, error) {
|
||||
if v.Mtu != nil {
|
||||
mtu := *v.Mtu
|
||||
if mtu < 576 || mtu > 1460 {
|
||||
return nil, errors.Format("Config: Invalid mKCP MTU size: %d", mtu)
|
||||
return nil, errors.New("Config: Invalid mKCP MTU size: ", mtu)
|
||||
}
|
||||
config.Mtu = &kcp.MTU{Value: mtu}
|
||||
}
|
||||
if v.Tti != nil {
|
||||
tti := *v.Tti
|
||||
if tti < 10 || tti > 100 {
|
||||
return nil, errors.Format("Config: Invalid mKCP TTI: %d", tti)
|
||||
return nil, errors.New("Config: Invalid mKCP TTI: ", tti)
|
||||
}
|
||||
config.Tti = &kcp.TTI{Value: tti}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
if resp.StatusCode != 200 {
|
||||
panic(errors.Format("Unexpected status %d", resp.StatusCode))
|
||||
panic(errors.New("unexpected status ", resp.StatusCode))
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
scanner := bufio.NewScanner(resp.Body)
|
||||
|
||||
Reference in New Issue
Block a user