cmd/http.go
// Copyright © 2019 Vyacheslav Akhmetov <iam@itaddict.ru>
package cmd
import (
"github.com/spf13/cobra"
)
// httpCmd represents the http command
var httpCmd = &cobra.Command{
Use: "http",
Short: "Measuring time for HTTP request.",
Long: `Measuring time for HTTP request.`,
Run: startMeasurements,
}
func init() {
rootCmd.AddCommand(httpCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// httpCmd.PersistentFlags().String("foo", "", "A help for foo")
httpCmd.PersistentFlags().BoolVarP(&sslEnable, "ssl", "", false, "enable SSL mode")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// httpCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}