server: don't always Sprintf params for logger
Add Stringer to Params, if we're not printing Debug messages (which usually is the case), it won't be called at all. Micro-optimization.
This commit is contained in:
parent
70e9e329cd
commit
c8ba155d47
2 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
package request
|
||||
|
||||
import "fmt"
|
||||
|
||||
type (
|
||||
// Params represents the JSON-RPC params.
|
||||
Params []Param
|
||||
|
@ -23,3 +25,7 @@ func (p Params) ValueWithType(index int, valType paramType) *Param {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p Params) String() string {
|
||||
return fmt.Sprintf("%v", []Param(p))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue