mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-18 22:14:35 +00:00
libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199)
* libs: Remove usage of custom Fmt, in favor of fmt.Sprintf Closes #2193 * Fix bug that was masked by custom Fmt!
This commit is contained in:
@@ -6,14 +6,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Like fmt.Sprintf, but skips formatting if args are empty.
|
||||
var Fmt = func(format string, a ...interface{}) string {
|
||||
if len(a) == 0 {
|
||||
return format
|
||||
}
|
||||
return fmt.Sprintf(format, a...)
|
||||
}
|
||||
|
||||
// IsHex returns true for non-empty hex-string prefixed with "0x"
|
||||
func IsHex(s string) bool {
|
||||
if len(s) > 2 && strings.EqualFold(s[:2], "0x") {
|
||||
|
||||
Reference in New Issue
Block a user