Work on conversion of args parsing to go code

This commit is contained in:
Kovid Goyal
2022-08-30 00:21:59 +05:30
parent 441e4edfb2
commit 79c8862d4c
32 changed files with 274 additions and 66 deletions

View File

@@ -7,6 +7,8 @@
package at
import (
"fmt"
"strings"
"time"
"github.com/spf13/cobra"
@@ -16,6 +18,9 @@ import (
"kitty/tools/utils"
)
var _ = fmt.Print
var _ = strings.Join
type options_CMD_NAME_type struct {
OPTIONS_DECLARATION_CODE
}
@@ -88,7 +93,7 @@ func aliasNormalizeFunc_CMD_NAME(f *pflag.FlagSet, name string) pflag.Normalized
func setup_CMD_NAME(root *cobra.Command) *cobra.Command {
ans := cli.CreateCommand(&cobra.Command{
Use: "CLI_NAME [options]",
Use: "CLI_NAME [options]" + "ARGSPEC",
Short: "SHORT_DESC",
Long: "LONG_DESC",
RunE: run_CMD_NAME,