func (debug *Debug) WriteDebug(debugFilePath string) error {
	debugBytes, err := json.Marshal(debug)
	if err != nil {
		return err
	}
	err = ioutil.WriteFile(debugFilePath, debugBytes, 0600)
	if err != nil {
		return err
	}
	return nil
}
WriteDebug will create a debug file to control the noop plugin
package debug
import (
	"encoding/json"
	"io/ioutil"
	"github.com/containernetworking/cni/pkg/skel"
)
const EmptyReportResultMessage = "set debug.ReportResult and call debug.WriteDebug() before calling this plugin"
type Debug struct {
	ReportResult         string
	ReportError          string
	ReportStderr         string
	ReportVersionSupport []string
	ExitWithCode         int
	Command string
	CmdArgs skel.CmdArgs
}
func ReadDebug(debugFilePath string) (*Debug, error) {
	debugBytes, err := ioutil.ReadFile(debugFilePath)
	if err != nil {
		return nil, err
	}
	var debug Debug
	err = json.Unmarshal(debugBytes, &debug)
	if err != nil {
		return nil, err
	}
	return &debug, nil
}