20 lines
512 B
Go
20 lines
512 B
Go
package tracetest
|
|
|
|
import (
|
|
"strings"
|
|
"unicode"
|
|
|
|
// Force-load native and js packages, to trigger registration
|
|
_ "github.com/ethereum/go-ethereum/eth/tracers/js"
|
|
_ "github.com/ethereum/go-ethereum/eth/tracers/native"
|
|
)
|
|
|
|
// camel converts a snake cased input string into a camel cased output.
|
|
func camel(str string) string {
|
|
pieces := strings.Split(str, "_")
|
|
for i := 1; i < len(pieces); i++ {
|
|
pieces[i] = string(unicode.ToUpper(rune(pieces[i][0]))) + pieces[i][1:]
|
|
}
|
|
return strings.Join(pieces, "")
|
|
}
|