func main() {
	plugin.Start(new(CfRecycleCmd))
}
main - entry point to the plugin
package main
import (
	"fmt"
	"strconv"
	"time"
	"code.cloudfoundry.org/cli/plugin"
)
const (
	CfRecyclePluginHelpText = "Recycle CF Application Instances"
	PluginName              = "cf-recycle-plugin"
	RUNNING = "running"
	STARTED = "started"
)
var (
	Major string
	Minor string
	Patch string
)
type CfRecycleCmd struct {
	startTime time.Time
	appName   string
}
func (CfRecycleCmd) GetMetadata() plugin.PluginMetadata {
	major, _ := strconv.Atoi(Major)
	minor, _ := strconv.Atoi(Minor)
	patch, _ := strconv.Atoi(Patch)
	return plugin.PluginMetadata{
		Name: PluginName,
		Version: plugin.VersionType{
			Major: major,
			Minor: minor,
			Build: patch,
		},
		Commands: []plugin.Command{
			{
				Name:     "recycle",
				HelpText: CfRecyclePluginHelpText,
			},
		},
	}
}