11////////////////////////////////////////////////////////////////////////////
22// Program: wireframe
33// Purpose: wire framing
4- // Authors: Myself <me@mine.org> (c) 2019 , All rights reserved
4+ // Authors: Myself <me@mine.org> (c) 2021 , All rights reserved
55////////////////////////////////////////////////////////////////////////////
66
77package main
@@ -34,11 +34,11 @@ type rootT struct {
3434var root = & cli.Command {
3535 Name : "wireframe" ,
3636 Desc : "wire framing\n Version " + version + " built on " + date +
37- "\n Copyright (C) 2019 , Myself <me@mine.org>" ,
37+ "\n Copyright (C) 2021 , Myself <me@mine.org>" ,
3838 Text : "Tool to showcase wire-framing command line app fast prototype" ,
3939 Global : true ,
4040 Argv : func () interface {} { t := new (rootT ); t .Self = t ; return t },
41- Fn : wireframe ,
41+ Fn : Wireframe ,
4242
4343 NumArg : cli .AtLeast (1 ),
4444}
@@ -64,7 +64,7 @@ var root = &cli.Command{
6464// var (
6565// progname = "wireframe"
6666// version = "0.1.0"
67- // date = "2019-09-12 "
67+ // date = "2021-02-14 "
6868
6969// rootArgv *rootT
7070// // Opts store all the configurable options
@@ -76,9 +76,7 @@ var root = &cli.Command{
7676
7777// Function main
7878// func main() {
79- // cli.SetUsageStyle(cli.DenseNormalStyle) // left-right, for up-down, use ManualStyle
80- // //NOTE: You can set any writer implements io.Writer
81- // // default writer is os.Stdout
79+ // cli.SetUsageStyle(cli.DenseNormalStyle)
8280// if err := cli.Root(root,
8381// cli.Tree(putDef),
8482// cli.Tree(getDef)).Run(os.Args[1:]); err != nil {
@@ -92,7 +90,8 @@ var root = &cli.Command{
9290//==========================================================================
9391// Dumb root handler
9492
95- // func wireframe(ctx *cli.Context) error {
93+ // Wireframe - main dispatcher dumb handler
94+ // func Wireframe(ctx *cli.Context) error {
9695// ctx.JSON(ctx.RootArgv())
9796// ctx.JSON(ctx.Argv())
9897// fmt.Println()
@@ -119,8 +118,12 @@ var root = &cli.Command{
119118//
120119// DoPut implements the business logic of command `put`
121120// func DoPut() error {
122- // fmt.Fprintf(os.Stderr, "%s v%s. put - Upload into service\n", progname, version)
123- // // fmt.Fprintf(os.Stderr, "Copyright (C) 2019, Myself <me@mine.org>\n\n")
121+ // fmt.Fprintf(os.Stderr, "Upload into service\n")
122+ // // fmt.Fprintf(os.Stderr, "Copyright (C) 2021, Myself <me@mine.org>\n\n")
123+ // // err := ...
124+ // // clis.WarnOn("Doing Put", err)
125+ // // or,
126+ // // clis.AbortOn("Doing Put", err)
124127// return nil
125128// }
126129
@@ -155,8 +158,12 @@ var putDef = &cli.Command{
155158//
156159// DoGet implements the business logic of command `get`
157160// func DoGet() error {
158- // fmt.Fprintf(os.Stderr, "%s v%s. get - Get from the service\n", progname, version)
159- // // fmt.Fprintf(os.Stderr, "Copyright (C) 2019, Myself <me@mine.org>\n\n")
161+ // fmt.Fprintf(os.Stderr, "Get from the service\n")
162+ // // fmt.Fprintf(os.Stderr, "Copyright (C) 2021, Myself <me@mine.org>\n\n")
163+ // // err := ...
164+ // // clis.WarnOn("Doing Get", err)
165+ // // or,
166+ // // clis.AbortOn("Doing Get", err)
160167// return nil
161168// }
162169
0 commit comments