File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed
Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ type OutputFile string
1313// InputFile describes input file (nmap XML full path)
1414type InputFile string
1515
16+ // InputFileConfig stores all options related to nmap XML (path, is content is taken from stdin and io reader)
1617type InputFileConfig struct {
1718 Path string
1819 IsStdin bool
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ type Formatter interface {
3737 defaultTemplateContent () string
3838}
3939
40+ // TemplateContent reads customly provided template content or fails with error
4041func TemplateContent (f Formatter , c * Config ) (string , error ) {
4142 if c .TemplatePath != "" {
4243 file , err := os .Open (c .TemplatePath )
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ type OutputOptions struct {
88 CSVOptions CSVOutputOptions
99}
1010
11+ // HTMLOutputOptions stores options related only to HTML conversion/formatting
1112type HTMLOutputOptions struct {
1213 // SkipDownHosts skips hosts that are down (including TOC)
1314 SkipDownHosts bool
@@ -25,6 +26,7 @@ type HTMLOutputOptions struct {
2526 FloatingContentsTable bool
2627}
2728
29+ // MarkdownOutputOptions stores options related only to Markdown conversion/formatting
2830type MarkdownOutputOptions struct {
2931 // SkipDownHosts skips hosts that are down (including TOC)
3032 SkipDownHosts bool
@@ -38,11 +40,13 @@ type MarkdownOutputOptions struct {
3840 SkipMetrics bool
3941}
4042
43+ // JSONOutputOptions store option related only to JSON conversion/formatting
4144type JSONOutputOptions struct {
4245 // PrettyPrint defines if JSON output would be pretty-printed (human-readable) or not (machine readable)
4346 PrettyPrint bool
4447}
4548
49+ // CSVOutputOptions store option related only to CSV conversion/formatting
4650type CSVOutputOptions struct {
4751 // The hosts that are down won't be displayed
4852 SkipDownHosts bool
You can’t perform that action at this time.
0 commit comments