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
13
13
// InputFile describes input file (nmap XML full path)
14
14
type InputFile string
15
15
16
+ // InputFileConfig stores all options related to nmap XML (path, is content is taken from stdin and io reader)
16
17
type InputFileConfig struct {
17
18
Path string
18
19
IsStdin bool
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ type Formatter interface {
37
37
defaultTemplateContent () string
38
38
}
39
39
40
+ // TemplateContent reads customly provided template content or fails with error
40
41
func TemplateContent (f Formatter , c * Config ) (string , error ) {
41
42
if c .TemplatePath != "" {
42
43
file , err := os .Open (c .TemplatePath )
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ type OutputOptions struct {
8
8
CSVOptions CSVOutputOptions
9
9
}
10
10
11
+ // HTMLOutputOptions stores options related only to HTML conversion/formatting
11
12
type HTMLOutputOptions struct {
12
13
// SkipDownHosts skips hosts that are down (including TOC)
13
14
SkipDownHosts bool
@@ -25,6 +26,7 @@ type HTMLOutputOptions struct {
25
26
FloatingContentsTable bool
26
27
}
27
28
29
+ // MarkdownOutputOptions stores options related only to Markdown conversion/formatting
28
30
type MarkdownOutputOptions struct {
29
31
// SkipDownHosts skips hosts that are down (including TOC)
30
32
SkipDownHosts bool
@@ -38,11 +40,13 @@ type MarkdownOutputOptions struct {
38
40
SkipMetrics bool
39
41
}
40
42
43
+ // JSONOutputOptions store option related only to JSON conversion/formatting
41
44
type JSONOutputOptions struct {
42
45
// PrettyPrint defines if JSON output would be pretty-printed (human-readable) or not (machine readable)
43
46
PrettyPrint bool
44
47
}
45
48
49
+ // CSVOutputOptions store option related only to CSV conversion/formatting
46
50
type CSVOutputOptions struct {
47
51
// The hosts that are down won't be displayed
48
52
SkipDownHosts bool
You can’t perform that action at this time.
0 commit comments