Skip to content

Commit 42bbd18

Browse files
committed
Add debug logs
1 parent d00f8cc commit 42bbd18

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/linkedin/gather.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ func (options *Options) Gather() []string {
2222
for _, company := range companies.Elements {
2323
// Extract the company name from the struct
2424
companyLinkedinName := strings.ToLower(company.EntityLockupView.Title.Text)
25+
log.Debug("Checking for " + companyLinkedinName)
2526
// If the ID is not empty and check for the company name (exact match or not)
2627
if company.EntityLockupView.TrackingUrn != "" && (!options.ExactMatch && strings.Contains(companyLinkedinName, options.Company) || options.ExactMatch && companyLinkedinName == options.Company) {
27-
log.Debug("Company name: " + companyLinkedinName)
28+
log.Debug("Company name: " + companyLinkedinName + " match")
2829
companyID, _ := strconv.Atoi(strings.Split(company.EntityLockupView.TrackingUrn, ":")[3])
2930
// Get the people of the company, starting from 0
3031
output = options.getPeople(companyID, 0)

src/linkedin/utils.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"GoMapEnum/src/utils"
55
"encoding/json"
66
"fmt"
7+
"net/url"
78
"strconv"
89
"strings"
910
)
@@ -30,6 +31,7 @@ func (options *Options) getCompany() linkedinListCompany {
3031
return companies
3132
}
3233
json.Unmarshal([]byte(body), &companies)
34+
log.Debug("Found " + strconv.Itoa(len(companies.Elements)) + " companies matching " + options.Company)
3335
return companies
3436
}
3537

0 commit comments

Comments
 (0)