all: replace some cases of strings.SplitN with strings.Cut (#28446)
This commit is contained in:
+1
-3
@@ -417,9 +417,7 @@ func rpcNode(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
func rpcSubscribe(client *rpc.Client, out io.Writer, method string, args ...string) error {
|
||||
parts := strings.SplitN(method, "_", 2)
|
||||
namespace := parts[0]
|
||||
method = parts[1]
|
||||
namespace, method, _ := strings.Cut(method, "_")
|
||||
ch := make(chan interface{})
|
||||
subArgs := make([]interface{}, len(args)+1)
|
||||
subArgs[0] = method
|
||||
|
||||
Reference in New Issue
Block a user