func (rr *JSONRenderer) ActionStarted(a *recipe.Action) {
	return
}
ActionStarted prints info about action in progress
package render
import (
	"encoding/json"
	"fmt"
	"path/filepath"
	"github.com/essentialkaos/bibop/recipe"
)
type JSONRenderer struct {
	report     *report
	curCommand *command
}
type report struct {
	RecipeInfo *recipeInfo `json:"recipe"`
	Commands   []*command  `json:"commands"`
}
type recipeInfo struct {
	RecipeFile    string `json:"recipe_file"`
	WorkingDir    string `json:"working_dir"`
	UnsafeActions bool   `json:"unsafe_actions"`
	RequireRoot   bool   `json:"require_root"`
	FastFinish    bool   `json:"fast_finish"`
	LockWorkdir   bool   `json:"lock_workdir"`
	Unbuffer      bool   `json:"unbuffer"`
}
type command struct {
	Actions      []*action `json:"actions"`
	User         string    `json:"user,omitempty"`
	Tag          string    `json:"tag,omitempty"`
	Cmdline      string    `json:"cmdline"`
	Description  string    `json:"description"`
	ErrorMessage string    `json:"error_message,omitempty"`
	IsFailed     bool      `json:"is_failed"`
}
type action struct {
	Arguments    []string `json:"arguments"`
	Name         string   `json:"name"`
	ErrorMessage string   `json:"error_message,omitempty"`
	IsFailed     bool     `json:"is_failed"`
}
func (rr *JSONRenderer) Start(r *recipe.Recipe) {
	rr.report = &report{}
	rr.report.RecipeInfo = &recipeInfo{
		UnsafeActions: r.UnsafeActions,
		RequireRoot:   r.RequireRoot,
		FastFinish:    r.FastFinish,
		LockWorkdir:   r.LockWorkdir,
		Unbuffer:      r.Unbuffer,
	}
	rr.report.RecipeInfo.RecipeFile, _ = filepath.Abs(r.File)
	rr.report.RecipeInfo.WorkingDir, _ = filepath.Abs(r.Dir)
}
func (rr *JSONRenderer) CommandStarted(c *recipe.Command) {
	rr.curCommand = rr.convertCommand(c)
}
func (rr *JSONRenderer) CommandFailed(c *recipe.Command, err error) {
	rr.curCommand.IsFailed = true
	rr.curCommand.ErrorMessage = err.Error()
	rr.report.Commands = append(rr.report.Commands, rr.curCommand)
}
func (rr *JSONRenderer) CommandDone(c *recipe.Command, isLast bool) {
	rr.report.Commands = append(rr.report.Commands, rr.curCommand)
}