File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ require (
199
199
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
200
200
github.com/containerd/ttrpc v1.1.0 // indirect
201
201
github.com/containerd/typeurl v1.0.2 // indirect
202
+ github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
202
203
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
203
204
github.com/davecgh/go-spew v1.1.1 // indirect
204
205
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
Original file line number Diff line number Diff line change @@ -674,6 +674,7 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc
674
674
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f /go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA =
675
675
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d /go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU =
676
676
github.com/cpuguy83/go-md2man/v2 v2.0.0 /go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU =
677
+ github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w =
677
678
github.com/cpuguy83/go-md2man/v2 v2.0.2 /go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o =
678
679
github.com/creack/pty v1.1.7 /go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY =
679
680
github.com/creack/pty v1.1.9 /go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E =
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ import (
12
12
"github.com/magefile/mage/mg"
13
13
"github.com/magefile/mage/sh"
14
14
"github.com/magefile/mage/target"
15
+ "github.com/spf13/cobra/doc"
16
+
17
+ "github.com/aquasecurity/trivy/pkg/commands"
15
18
)
16
19
17
20
var (
@@ -356,7 +359,15 @@ func (Docs) Serve() error {
356
359
357
360
// Generate generates CLI references
358
361
func (Docs ) Generate () error {
359
- // TODO
362
+ ver , err := version ()
363
+ if err != nil {
364
+ return err
365
+ }
366
+ cmd := commands .NewApp (ver )
367
+ cmd .DisableAutoGenTag = true
368
+ if err = doc .GenMarkdownTree (cmd , "./docs/docs/references/cli" ); err != nil {
369
+ return err
370
+ }
360
371
return nil
361
372
}
362
373
You can’t perform that action at this time.
0 commit comments