From dcbd0094dd1e0f8416d6169b0a137d0ab3b0fa9c Mon Sep 17 00:00:00 2001 From: Martin Lees Date: Wed, 18 Dec 2019 17:30:16 +0100 Subject: [PATCH] removal of timestamp flag doc --- docs/v2/manual.md | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/docs/v2/manual.md b/docs/v2/manual.md index 5e54d64..5e04d4e 100644 --- a/docs/v2/manual.md +++ b/docs/v2/manual.md @@ -1150,43 +1150,6 @@ The default version flag (`-v/--version`) is defined as `cli.VersionFlag`, which is checked by the cli internals in order to print the `App.Version` via `cli.VersionPrinter` and break execution. -### Timestamp Flag - -Using the timestamp flag is simple, You can look at time.Parse to get layout examples : https://golang.org/pkg/time/#example_Parse - - -``` go -package main - -import ( - "fmt" - "log" - "os" - - "github.com/urfave/cli/v2" -) - -func main() { - app := &cli.App{ - Flags: []cli.Flag { - &cli.TimestampFlag{Name: "meeting", Layout: "2006-01-02T15:04:05"}, - }, - Action: func(c *cli.Context) error { - fmt.Printf("%#v",c.Timestamp("meeting").String()) - return nil - }, - } - - err := app.Run(os.Args) - if err != nil { - log.Fatal(err) - } -} -``` - #### Customization The default flag may be customized to something other than `-v/--version` by