Skip to content

Commit 9b51dd9

Browse files
author
Gustavo Bazan
authored
task: update doc generation with latest cobra features (#1529)
1 parent d55580d commit 9b51dd9

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

tools/atlasclidocs/main.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ func main() {
4444
}
4545

4646
atlasBuilder := atlas.Builder()
47-
48-
// init completion command indirectly
49-
// See: https://github.com/spf13/cobra/issues/1464
50-
_, _ = atlasBuilder.ExecuteC()
47+
atlasBuilder.InitDefaultCompletionCmd()
5148

5249
setDisableAutoGenTag(atlasBuilder)
5350

tools/mongoclidocs/main.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,8 @@ func main() {
4242
}
4343

4444
mongocliBuilder := mongocli.Builder(&profile, []string{})
45+
mongocliBuilder.InitDefaultCompletionCmd()
4546
removeDeprecateStringAtlasCommand(mongocliBuilder)
46-
47-
// init completion command indirectly
48-
// See: https://github.com/spf13/cobra/issues/1464
49-
_, _ = mongocliBuilder.ExecuteC()
50-
5147
setDisableAutoGenTag(mongocliBuilder)
5248

5349
if err := cobra2snooty.GenTreeDocs(mongocliBuilder, "./docs/mongocli/command"); err != nil {

0 commit comments

Comments
 (0)