diff options
| author | Shulhan <ms@kilabit.info> | 2025-08-13 18:47:49 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-08-20 02:43:53 +0700 |
| commit | f9c0f7d0e73c89b7473b7c0123427b934fcbff65 (patch) | |
| tree | a91c46b963889e67bc4a0e65ba2ad9829540e72b /scan_report.go | |
| parent | d34a7d3def91fb614fb657b81ff8265f19e078c8 (diff) | |
| download | lilin-f9c0f7d0e73c89b7473b7c0123427b934fcbff65.tar.xz | |
all: store the service logs into file
Diffstat (limited to 'scan_report.go')
| -rw-r--r-- | scan_report.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scan_report.go b/scan_report.go index 6544dc7..4b4938d 100644 --- a/scan_report.go +++ b/scan_report.go @@ -18,3 +18,14 @@ type ScanReport struct { // Success is true if service available. Success bool } + +func (report *ScanReport) toCSV() (record []string) { + record = append(record, report.At.String()) + if report.Success { + record = append(record, "true") + } else { + record = append(record, "false") + } + record = append(record, report.Error) + return record +} |
