remove errors.Format

This commit is contained in:
Darien Raymond committed 2017-04-09 00:31:06 +02:00
1 parent 6c736b8d57
commit bc4e2293ef
4 files changed
+5 -22

No files matched your search

+2 -2
View File
@@ -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}
}