func usage() {
	fmt.Println("A simple Command line interface (CLI) to manage connectors through the Kafka Connect REST Interface.\n")
	fmt.Fprintf(os.Stdin, "Usage of %s: command [arguments] \n", os.Args[0])
	fmt.Println("The commands are : \n")
	keys := []string{}
	for k := range Commands {
		keys = append(keys, k)
	}
	sort.Strings(keys)
	for _, k := range keys {
		fmt.Printf("	%-25s%s\n", k, Commands[k])
	}
	fmt.Println("\nUse \"kafka-connect-cli help [command]\" for more information about that command.")
	os.Exit(1)
}
Display commands usage and exit with return code 1.
package main
import (
	"encoding/json"
	"flag"
	"fmt"
	"github.com/fhussonnois/kafkacli/connect"
	"github.com/fhussonnois/kafkacli/utils"
	"io/ioutil"
	"os"
	"regexp"
	"sort"
	"strconv"
	"strings"
)
var Commands = map[string]string{
	"list":           "Listing active connectors on a worker.",
	"config":         "Getting connector configuration.",
	"create":         "Creating a new connector.",
	"delete":         "Deleting a connector.",
	"delete-all":     "eleting all connectors.",
	"pause":          "Pausing a connector (useful if downtime is needed for the system the connector interacts with).",
	"plugins":        "Listing installed connectors plugins.",
	"resume":         "Restarting a connector.",
	"restart-failed": "Restarting failed tasks for a connector.",
	"status":         "Getting connector status.",
	"tasks":          "Getting tasks for a connector.",
	"scale":          "Scaling up/down the number of tasks for a connector.",
	"update":         "Updating connector configuration.",
	"version":        "Getting a connect worker version.",
}