aboutsummaryrefslogtreecommitdiffstats
path: root/client/go/cmd/root.go
blob: 8f33cb47c438825991ff6cbdd76652a20ced2379 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Root Cobra command: vespa
// author: bratseth

package cmd

import (
    "github.com/spf13/cobra"
)

var (
	// flags
	// TODO: add timeout flag
	// TODO: add flag to show http request made
	targetArgument string

	rootCmd = &cobra.Command{
		Use:   "vespa",
		Short: "A command-line tool for working with Vespa instances",
		Long: `TO
DO`,
	}
)

func init() {
	cobra.OnInitialize(readConfig)
	rootCmd.PersistentFlags().StringVarP(&targetArgument, "target", "t", "local", "The name or URL of the recipient of this command")
}

// Execute executes the root command.
func Execute() error {
	err := rootCmd.Execute()
	return err
}