Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "kocorico", Short: "A brief description of your application", Long: `A longer description that spans multiple lines and likely contains examples and usage of using your application. For example: Cobra is a CLI library for Go that empowers applications. This application is a tool to generate the needed files to quickly create a Cobra application.`, PersistentPreRun: func(cmd *cobra.Command, args []string) { cfg := etcdClient.Config{ Endpoints: viper.GetStringSlice("etcd-endpoints"), Transport: etcdClient.DefaultTransport, HeaderTimeoutPerRequest: time.Second, } c, err := etcdClient.New(cfg) if err != nil { log.Fatal(err) } etcd.Kapi = etcdClient.NewKeysAPI(c) }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
func ClusterCtx ¶
ClusterCtx middleware is used to load an Article object from the URL parameters passed through as the request. In case the Article could not be found, we stop here and return a 404.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.