Avoid double newline

Signed-off-by: Hadi <[email protected]>
This commit is contained in:
Hadi
2025-05-21 10:12:33 +02:00
parent 15458ab78e
commit e4cec2b07a
3 changed files with 20 additions and 5 deletions
+2
View File
@@ -92,5 +92,7 @@ func (r Recon) Email(email string) (response []EmailResult) {
if len(results) == 0 { if len(results) == 0 {
r.PrintInfo("INFO", "No commits found") r.PrintInfo("INFO", "No commits found")
} }
r.PrintNewline()
return return
} }
+15 -4
View File
@@ -48,7 +48,9 @@ func (r Recon) SshKeys(username string) (response []SSHKeyResult) {
r.PrintInfo("Verified", k.Verified) r.PrintInfo("Verified", k.Verified)
r.PrintInfo("Last Used", k.LastUsed) r.PrintInfo("Last Used", k.LastUsed)
r.PrintInfo("Added By", k.AddedBy) r.PrintInfo("Added By", k.AddedBy)
r.PrintNewline() if i != len(sshKeys)-1 {
r.PrintNewline()
}
} }
} }
r.PrintNewline() r.PrintNewline()
@@ -122,6 +124,9 @@ func (r Recon) GpgKeys(username string) (response []GPGKeyResult) {
r.PrintInfo(" Email n°", fmt.Sprintf("%d", j)) r.PrintInfo(" Email n°", fmt.Sprintf("%d", j))
r.PrintInfo(" Email", email.Email) r.PrintInfo(" Email", email.Email)
r.PrintInfo(" Verified", email.Verified) r.PrintInfo(" Verified", email.Verified)
if j != len(k.Emails)-1 {
r.PrintNewline()
}
} }
r.PrintInfo("Subkeys", fmt.Sprintf("%d", len(k.Subkeys))) r.PrintInfo("Subkeys", fmt.Sprintf("%d", len(k.Subkeys)))
for j, subkey := range k.Subkeys { for j, subkey := range k.Subkeys {
@@ -131,9 +136,13 @@ func (r Recon) GpgKeys(username string) (response []GPGKeyResult) {
r.PrintInfo(" Subkey Created At", subkey.CreatedAt) r.PrintInfo(" Subkey Created At", subkey.CreatedAt)
r.PrintInfo(" Subkey Primary Key ID", subkey.PrimaryKeyID) r.PrintInfo(" Subkey Primary Key ID", subkey.PrimaryKeyID)
r.PrintInfo(" Subkey Raw Key", subkey.RawKey) r.PrintInfo(" Subkey Raw Key", subkey.RawKey)
if j != len(k.Subkeys)-1 {
r.PrintNewline()
}
}
if i != len(gpgKeys)-1 {
r.PrintNewline()
} }
r.PrintNewline()
} }
} }
r.PrintNewline() r.PrintNewline()
@@ -173,7 +182,9 @@ func (r Recon) SshSigningKeys(username string) (response []SSHSigningKeyResult)
r.PrintInfo("Title", k.Title) r.PrintInfo("Title", k.Title)
r.PrintInfo("Created At", k.CreatedAt) r.PrintInfo("Created At", k.CreatedAt)
r.PrintInfo("Key", k.Key) r.PrintInfo("Key", k.Key)
r.PrintNewline() if i != len(signingKeys)-1 {
r.PrintNewline()
}
response = append(response, k) response = append(response, k)
} }
} }
+3 -1
View File
@@ -32,7 +32,9 @@ func (r Recon) Orgs(username string) (response []OrgResult) {
r.PrintInfo("ID", o.ID) r.PrintInfo("ID", o.ID)
r.PrintInfo("URL", o.URL) r.PrintInfo("URL", o.URL)
r.PrintInfo("Description", o.Description) r.PrintInfo("Description", o.Description)
r.PrintNewline() if i != len(orgs)-1 {
r.PrintNewline()
}
response = append(response, o) response = append(response, o)
} }
} }