<commit_before>package main

import (
	"fmt"
	"log"
	"os"

	"github.com/codegangsta/cli"

	"github.com/st3v/go-eureka"
)

var getStatus = func(c *cli.Context, required bool) eureka.Status {
	name := c.Args().First()

	if name == "" && required {
		fmt.Fprintln(c.App.Writer, "must specify status")
		os.Exit(1)
	}

	if name == "" {
		return eureka.StatusUnknown
	}

	status, err := eureka.ParseStatus(c.Args().First())
	if err != nil {
		fmt.Fprintln(c.App.Writer, err)
		os.Exit(1)
	}

	return status
}

var overrideCmd = cli.Command{
	Name:  "override-status",
	Usage: "override the status of a registered instance",

	Flags: []cli.Flag{
		instanceFlag,
		endpointsFlag,
	},

	Action: func(c *cli.Context) {
		instance := getInstance(c, "heartbeat")
		endpoints := getEndpoints(c, "heartbeat")
		status := getStatus(c, true)

		log.Printf("Overriding status for instance '%s' of application '%s'... \n", instance.Id, instance.AppName)
		client := eureka.NewClient(endpoints)
		if err := client.StatusOverride(instance, status); err != nil {
			log.Fatalf("Error overriding status: %s", err)
		}

		log.Println("Success")
	},
}

var removeOverrideCmd = cli.Command{
	Name:  "remove-override",
	Usage: "remove status override from a registered instance",

	Flags: []cli.Flag{
		instanceFlag,
		endpointsFlag,
	},

	Action: func(c *cli.Context) {
		instance := getInstance(c, "heartbeat")
		endpoints := getEndpoints(c, "heartbeat")
		status := getStatus(c, false)

		log.Printf("Remove overridden status from instance '%s' of application '%s'... \n", instance.Id, instance.AppName)
		client := eureka.NewClient(endpoints)
		if err := client.RemoveStatusOverride(instance, status); err != nil {
			log.Fatalf("Error overriding status: %s", err)
		}

		log.Println("Success")
	},
}<commit_msg>Fix command names<commit_after>package main

import (
	"fmt"
	"log"
	"os"

	"github.com/codegangsta/cli"

	"github.com/st3v/go-eureka"
)

var getStatus = func(c *cli.Context, required bool) eureka.Status {
	name := c.Args().First()

	if name == "" && required {
		fmt.Fprintln(c.App.Writer, "must specify status")
		os.Exit(1)
	}

	if name == "" {
		return eureka.StatusUnknown
	}

	status, err := eureka.ParseStatus(c.Args().First())
	if err != nil {
		fmt.Fprintln(c.App.Writer, err)
		os.Exit(1)
	}

	return status
}

var overrideCmd = cli.Command{
	Name:  "override-status",
	Usage: "override the status of a registered instance",

	Flags: []cli.Flag{
		instanceFlag,
		endpointsFlag,
	},

	Action: func(c *cli.Context) {
		instance := getInstance(c, "override-status")
		endpoints := getEndpoints(c, "override-status")
		status := getStatus(c, true)

		log.Printf("Overriding status for instance '%s' of application '%s'... \n", instance.Id, instance.AppName)
		client := eureka.NewClient(endpoints)
		if err := client.StatusOverride(instance, status); err != nil {
			log.Fatalf("Error overriding status: %s", err)
		}

		log.Println("Success")
	},
}

var removeOverrideCmd = cli.Command{
	Name:  "remove-override",
	Usage: "remove status override from a registered instance",

	Flags: []cli.Flag{
		instanceFlag,
		endpointsFlag,
	},

	Action: func(c *cli.Context) {
		instance := getInstance(c, "remove-override")
		endpoints := getEndpoints(c, "remove-override")
		status := getStatus(c, false)

		log.Printf("Remove overridden status from instance '%s' of application '%s'... \n", instance.Id, instance.AppName)
		client := eureka.NewClient(endpoints)
		if err := client.RemoveStatusOverride(instance, status); err != nil {
			log.Fatalf("Error overriding status: %s", err)
		}

		log.Println("Success")
	},
}
{'fraction_non_alphanumeric': 0.15844875346260387, 'fraction_numerical': 0.0016620498614958448, 'mean_word_length': 4.1365576102418204, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3273331', 'n_tokens_mistral': 1349, 'n_tokens_neox': 1259, 'n_words': 300}