update doc generation (#926)
This commit is contained in:
parent
899b2abae7
commit
2f937cb53a
|
@ -199,9 +199,10 @@ func DisplayOneAlert(alert *models.Alert, withDetail bool) error {
|
||||||
func NewAlertsCmd() *cobra.Command {
|
func NewAlertsCmd() *cobra.Command {
|
||||||
/* ---- ALERTS COMMAND */
|
/* ---- ALERTS COMMAND */
|
||||||
var cmdAlerts = &cobra.Command{
|
var cmdAlerts = &cobra.Command{
|
||||||
Use: "alerts [action]",
|
Use: "alerts [action]",
|
||||||
Short: "Manage alerts",
|
Short: "Manage alerts",
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
|
DisableAutoGenTag: true,
|
||||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||||
var err error
|
var err error
|
||||||
if err := csConfig.LoadAPIClient(); err != nil {
|
if err := csConfig.LoadAPIClient(); err != nil {
|
||||||
|
|
|
@ -15,9 +15,10 @@ import (
|
||||||
|
|
||||||
func NewConsoleCmd() *cobra.Command {
|
func NewConsoleCmd() *cobra.Command {
|
||||||
var cmdConsole = &cobra.Command{
|
var cmdConsole = &cobra.Command{
|
||||||
Use: "console [action]",
|
Use: "console [action]",
|
||||||
Short: "Manage interaction with Crowdsec console (https://app.crowdsec.net)",
|
Short: "Manage interaction with Crowdsec console (https://app.crowdsec.net)",
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
|
DisableAutoGenTag: true,
|
||||||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
||||||
if err := csConfig.LoadAPIServer(); err != nil || csConfig.DisableAPI {
|
if err := csConfig.LoadAPIServer(); err != nil || csConfig.DisableAPI {
|
||||||
log.Fatal("Local API is disabled, please run this command on the local API machine")
|
log.Fatal("Local API is disabled, please run this command on the local API machine")
|
||||||
|
|
|
@ -100,8 +100,7 @@ title: %s
|
||||||
}
|
}
|
||||||
|
|
||||||
func linkHandler(name string) string {
|
func linkHandler(name string) string {
|
||||||
base := strings.TrimSuffix(name, path.Ext(name))
|
return fmt.Sprintf("/cscli/%s", name)
|
||||||
return fmt.Sprintf("/docs/cscli/%s", base)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -111,7 +110,8 @@ func main() {
|
||||||
Short: "cscli allows you to manage crowdsec",
|
Short: "cscli allows you to manage crowdsec",
|
||||||
Long: `cscli is the main command to interact with your crowdsec service, scenarios & db.
|
Long: `cscli is the main command to interact with your crowdsec service, scenarios & db.
|
||||||
It is meant to allow you to manage bans, parsers/scenarios/etc, api and generally manage you crowdsec setup.`,
|
It is meant to allow you to manage bans, parsers/scenarios/etc, api and generally manage you crowdsec setup.`,
|
||||||
ValidArgs: validArgs,
|
ValidArgs: validArgs,
|
||||||
|
DisableAutoGenTag: true,
|
||||||
/*TBD examples*/
|
/*TBD examples*/
|
||||||
}
|
}
|
||||||
var cmdDocGen = &cobra.Command{
|
var cmdDocGen = &cobra.Command{
|
||||||
|
|
Loading…
Reference in a new issue