func Get(name string) (Action, error) {
	if initFunc, exists := actions[name]; exists {
		return initFunc()
	}
	return nil, fmt.Errorf("action %q does not exist as a supported action", name)
}
Get initializes and returns the registered action.
package action
import (
	"fmt"
	"github.com/genuinetools/bpfd/api/grpc"
)
var (
	actions map[string]InitFunc
)
type InitFunc func() (Action, error)
type Action interface {
	Do(event *grpc.Event) error
	String() string
}
func init() {
	actions = make(map[string]InitFunc)
}
func Register(name string, initFunc InitFunc) error {
	if _, exists := actions[name]; exists {
		return fmt.Errorf("action name already registered %s", name)
	}
	actions[name] = initFunc
	return nil
}