func (r *marathonClient) KillTask(taskID string, opts *KillTaskOpts) (*Task, error) {
	appName := taskID[0:strings.LastIndex(taskID, ".")]
	appName = strings.Replace(appName, "_", "/", -1)
	taskID = strings.Replace(taskID, "/", "_", -1)
	u := fmt.Sprintf("%s/%s/tasks/%s", marathonAPIApps, appName, taskID)
	u, err := addOptions(u, opts)
	if err != nil {
		return nil, err
	}
	wrappedTask := new(struct {
		Task Task `json:"task"`
	})
	if err := r.apiDelete(u, nil, wrappedTask); err != nil {
		return nil, err
	}
	return &wrappedTask.Task, nil
}
KillTask kills the task associated with a given ID
taskID:		the id for the task
opts:		KillTaskOpts request payload
package marathon
import (
	"fmt"
	"strings"
)
type Tasks struct {
	Tasks []Task `json:"tasks"`
}
type Task struct {
	ID                 string               `json:"id"`
	AppID              string               `json:"appId"`
	Host               string               `json:"host"`
	HealthCheckResults []*HealthCheckResult `json:"healthCheckResults"`
	Ports              []int                `json:"ports"`
	ServicePorts       []int                `json:"servicePorts"`
	SlaveID            string               `json:"slaveId"`
	StagedAt           string               `json:"stagedAt"`
	StartedAt          string               `json:"startedAt"`
	State              string               `json:"state"`
	IPAddresses        []*IPAddress         `json:"ipAddresses"`
	Version            string               `json:"version"`
}
type IPAddress struct {
	IPAddress string `json:"ipAddress"`
	Protocol  string `json:"protocol"`
}
type AllTasksOpts struct {
	Status string `url:"status,omitempty"`
}
type KillApplicationTasksOpts struct {
	Host  string `url:"host,omitempty"`
	Scale bool   `url:"scale,omitempty"`
	Force bool   `url:"force,omitempty"`
}
type KillTaskOpts struct {
	Scale bool `url:"scale,omitempty"`
	Force bool `url:"force,omitempty"`
}
func (r *Task) HasHealthCheckResults() bool {
	return r.HealthCheckResults != nil && len(r.HealthCheckResults) > 0
}
func (r *marathonClient) AllTasks(opts *AllTasksOpts) (*Tasks, error) {
	u, err := addOptions(marathonAPITasks, opts)
	if err != nil {
		return nil, err
	}
	tasks := new(Tasks)
	if err := r.apiGet(u, nil, tasks); err != nil {
		return nil, err
	}
	return tasks, nil
}
func (r *marathonClient) Tasks(id string) (*Tasks, error) {
	tasks := new(Tasks)
	if err := r.apiGet(fmt.Sprintf("%s/%s/tasks", marathonAPIApps, trimRootPath(id)), nil, tasks); err != nil {
		return nil, err
	}
	return tasks, nil
}
func (r *marathonClient) KillApplicationTasks(id string, opts *KillApplicationTasksOpts) (*Tasks, error) {
	u := fmt.Sprintf("%s/%s/tasks", marathonAPIApps, trimRootPath(id))
	u, err := addOptions(u, opts)
	if err != nil {
		return nil, err
	}
	tasks := new(Tasks)
	if err := r.apiDelete(u, nil, tasks); err != nil {
		return nil, err
	}
	return tasks, nil
}