about summary refs log tree commit diff
path: root/src/cmd.go
blob: a17da4abc995b77d8afd7d1eeb5d2e35c6d75ecc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package main

import (
	"github.com/radare/r2pipe-go"
	"github.com/sirupsen/logrus"
)

func r2cmd(r2p *r2pipe.Pipe, input string) string {

	logrus.Tracef("> %s", input)

	// send a command
	buf1, err := r2p.Cmd(input)
	if err != nil {
		panic(err)
	}

	// return the result of the command as a string
	return buf1
}