Skip to content

Commit 08007fa

Browse files
committed
docs: add TimestampFlag migration
1 parent 22bee4f commit 08007fa

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

docs/migrate-v2-to-v3.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,4 +216,27 @@ Compiler messages you might see(for ActionFunc):
216216
```
217217
cannot use func literal (type func(*cli.Context) error) as type cli.ActionFunc in field value
218218
```
219-
Similar messages would be shown for other funcs
219+
220+
Similar messages would be shown for other funcs.
221+
222+
## TimestampFlag
223+
224+
=== "v2"
225+
226+
```go
227+
&cli.TimestampFlag{
228+
Name: "foo",
229+
Layout: time.RFC3339,
230+
}
231+
```
232+
233+
=== "v3"
234+
235+
```go
236+
&cli.TimestampFlag{
237+
Name: "foo",
238+
Config: cli.TimestampConfig{
239+
Layouts: []string{time.RFC3339},
240+
},
241+
}
242+
```

0 commit comments

Comments
 (0)