mirror of
https://gitea.com/gitea/tea.git
synced 2026-06-05 18:58:43 +02:00
8e0666ab85
Reviewed-on: https://gitea.com/gitea/tea/pulls/1003 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-committed-by: techknowlogick <techknowlogick@gitea.com>
30 lines
603 B
Go
30 lines
603 B
Go
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
//go:generates
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
|
|
docs "github.com/urfave/cli-docs/v3"
|
|
"github.com/urfave/cli/v3"
|
|
|
|
"gitea.dev/tea/cmd"
|
|
)
|
|
|
|
// CmdDocs generates markdown for tea
|
|
func main() {
|
|
cli := &cli.Command{
|
|
Name: "docs",
|
|
Hidden: true,
|
|
Description: "Generate CLI docs",
|
|
Flags: cmd.DocRenderFlags,
|
|
Action: func(ctx context.Context, params *cli.Command) error {
|
|
return cmd.RenderDocs(params, cmd.App(), docs.ToMarkdown)
|
|
},
|
|
}
|
|
cli.Run(context.Background(), os.Args)
|
|
}
|