func RegisterAfter(path string, handler AfterHandlerFunc) {
	if _, ok := afterRegistry[path]; !ok {
		afterRegistry[path] = make([]AfterHandlerFunc, 0, 1)
	}
	afterRegistry[path] = append(afterRegistry[path], handler)
}
RegisterAfter registers a post-request handler for the given command path.
The handler may modify the unmarshalled response.
package cli
import (
	"strings"
	"github.com/spf13/cobra"
	"github.com/spf13/viper"
	gentleman "gopkg.in/h2non/gentleman.v2"
)
type BeforeHandlerFunc func(string, *viper.Viper, *gentleman.Request)
type AfterHandlerFunc func(string, *viper.Viper, *gentleman.Response, interface{}) interface{}
var beforeRegistry = make(map[string][]BeforeHandlerFunc)
var afterRegistry = make(map[string][]AfterHandlerFunc)
func RegisterBefore(path string, handler BeforeHandlerFunc) {
	if _, ok := beforeRegistry[path]; !ok {
		beforeRegistry[path] = make([]BeforeHandlerFunc, 0, 1)
	}
	beforeRegistry[path] = append(beforeRegistry[path], handler)
}