mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Add timestamp to scan results cache
This commit is contained in:
parent
5f86f9a378
commit
6aeffc92f1
4 changed files with 17 additions and 12 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/OpenCHAMI/magellan/internal/db/sqlite"
|
||||
|
||||
|
|
@ -25,7 +26,7 @@ var listCmd = &cobra.Command{
|
|||
fmt.Printf("%s\n", string(b))
|
||||
} else {
|
||||
for _, r := range probeResults {
|
||||
fmt.Printf("%s:%d (%s)\n", r.Host, r.Port, r.Protocol)
|
||||
fmt.Printf("%s:%d (%s) @ %s\n", r.Host, r.Port, r.Protocol, r.Timestamp.Format(time.UnixDate))
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
magellan "github.com/OpenCHAMI/magellan/internal"
|
||||
"github.com/OpenCHAMI/magellan/internal/db/sqlite"
|
||||
|
|
@ -76,7 +77,7 @@ var scanCmd = &cobra.Command{
|
|||
fmt.Printf("%s\n", string(b))
|
||||
} else {
|
||||
for _, r := range probeStates {
|
||||
fmt.Printf("%s:%d (%s)\n", r.Host, r.Port, r.Protocol)
|
||||
fmt.Printf("%s:%d (%s) @ %s\n", r.Host, r.Port, r.Protocol, r.Timestamp.Format(time.UnixDate))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue