Skip to content

Commit 5463069

Browse files
committed
Stylefixes (comments for structs/functions)
1 parent 1a55492 commit 5463069

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

formatter/file.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type OutputFile string
1313
// InputFile describes input file (nmap XML full path)
1414
type InputFile string
1515

16+
// InputFileConfig stores all options related to nmap XML (path, is content is taken from stdin and io reader)
1617
type InputFileConfig struct {
1718
Path string
1819
IsStdin bool

formatter/formatter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
4041
func TemplateContent(f Formatter, c *Config) (string, error) {
4142
if c.TemplatePath != "" {
4243
file, err := os.Open(c.TemplatePath)

formatter/output_options.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ type OutputOptions struct {
88
CSVOptions CSVOutputOptions
99
}
1010

11+
// HTMLOutputOptions stores options related only to HTML conversion/formatting
1112
type 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
2830
type 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
4144
type 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
4650
type CSVOutputOptions struct {
4751
// The hosts that are down won't be displayed
4852
SkipDownHosts bool

0 commit comments

Comments
 (0)