neoneo-go/pkg/services/rpcsrv/params/params.go

23 lines
345 B
Go
Raw Normal View History

package params
import "fmt"
type (
2019-10-22 14:56:03 +00:00
// Params represents the JSON-RPC params.
Params []Param
)
// Value returns the param struct for the given
// index if it exists.
func (p Params) Value(index int) *Param {
if len(p) > index {
return &p[index]
}
return nil
}
func (p Params) String() string {
return fmt.Sprintf("%v", []Param(p))
}