-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
- Loading branch information
1 parent
618093d
commit 11d79f8
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/rs/zerolog/log" | ||
"github.com/spf13/pflag" | ||
"go.mondoo.com/cnspec/apps/cnspec/cmd" | ||
) | ||
|
||
func main() { | ||
flags := pflag.NewFlagSet("", pflag.ContinueOnError) | ||
dir := flags.String("docs-path", "", "Path directory where you want generate doc files") | ||
|
||
if err := flags.Parse(os.Args); err != nil { | ||
log.Fatal().Err(err).Msg("error: could not parse flags") | ||
} | ||
|
||
if *dir == "" { | ||
log.Fatal().Msg("error: --docs-path is required") | ||
} | ||
|
||
err := cmd.GenerateMarkdown(*dir) | ||
if err != nil { | ||
log.Fatal().Err(err).Msg("could not generate markdown") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters