fix: redundant use of fmt.Sprintf()
parent
83c57e6a16
commit
082d5f1d3f
|
@ -33,24 +33,24 @@ func PointMsg(edb *ii.EDB, db *ii.DB, udb *ii.UDB, pauth string, tmsg string) st
|
|||
m, err := ii.DecodeMsgline(tmsg, true)
|
||||
if err != nil {
|
||||
ii.Error.Printf("Receive point msg: %s", err)
|
||||
return fmt.Sprintf("%s", err)
|
||||
return err.Error()
|
||||
}
|
||||
if r, _ := m.Tag("repto"); r != "" {
|
||||
if db.Lookup(r) == nil {
|
||||
ii.Error.Printf("Receive point msg with wrong repto.")
|
||||
return fmt.Sprintf("Receive point msg with wrong repto.")
|
||||
return "Receive point msg with wrong repto."
|
||||
}
|
||||
}
|
||||
if !edb.Allowed(m.Echo) {
|
||||
ii.Error.Printf("This echo is disallowed")
|
||||
return fmt.Sprintf("This echo is disallowed")
|
||||
return "This echo is disallowed"
|
||||
}
|
||||
|
||||
m.From = udb.Name(pauth)
|
||||
m.Addr = fmt.Sprintf("%s,%d", db.Name, udb.Id(pauth))
|
||||
if err := db.Store(m); err != nil {
|
||||
ii.Error.Printf("Store point msg: %s", err)
|
||||
return fmt.Sprintf("%s", err)
|
||||
return err.Error()
|
||||
}
|
||||
return "msg ok"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue