@@ -76,7 +76,7 @@ func cmdExtractEmails(cmd *cobra.Command, args []string) error {
7676 for _ , f := range jsonFiles {
7777 absJsonFilePath := filepath .Join (jsonDir , f .Name ())
7878 log .Printf ("Processing file %s" , absJsonFilePath )
79-
79+
8080 jsonFileContent , err := os .ReadFile (absJsonFilePath )
8181 if err != nil {
8282 log .Printf ("Error reading file %s: %v" , absJsonFilePath , err )
@@ -115,7 +115,7 @@ func processRSSFeed(podcast PodcastInformation, fp *gofeed.Parser) EmailResult {
115115 }
116116
117117 log .Printf ("Parsing RSS feed for %s: %s" , podcast .Name , podcast .RSSFeed )
118-
118+
119119 feed , err := fp .ParseURL (podcast .RSSFeed )
120120 if err != nil {
121121 result .Error = err .Error ()
@@ -179,10 +179,10 @@ func processRSSFeed(podcast PodcastInformation, fp *gofeed.Parser) EmailResult {
179179 if episodesToCheck > 3 {
180180 episodesToCheck = 3
181181 }
182-
182+
183183 for i := 0 ; i < episodesToCheck ; i ++ {
184184 item := feed .Items [i ]
185-
185+
186186 if item .Author != nil && item .Author .Email != "" {
187187 emails [item .Author .Email ] = true
188188 authors [item .Author .Email ] = AuthorInfo {
@@ -208,7 +208,7 @@ func processRSSFeed(podcast PodcastInformation, fp *gofeed.Parser) EmailResult {
208208 for email := range emails {
209209 result .Emails = append (result .Emails , email )
210210 }
211-
211+
212212 for _ , author := range authors {
213213 result .Authors = append (result .Authors , author )
214214 }
@@ -226,7 +226,7 @@ func addEmailsFromText(text string, emails map[string]bool) {
226226 // Regular expression to match email addresses
227227 emailRegex := regexp .MustCompile (`[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}` )
228228 matches := emailRegex .FindAllString (text , - 1 )
229-
229+
230230 for _ , match := range matches {
231231 // Clean up the email (remove any trailing punctuation)
232232 email := strings .Trim (match , ".,;!?" )
@@ -243,7 +243,7 @@ func writeResultsToFile(results []EmailResult, filename string) error {
243243
244244 encoder := json .NewEncoder (file )
245245 encoder .SetIndent ("" , " " )
246-
246+
247247 if err := encoder .Encode (results ); err != nil {
248248 return err
249249 }
@@ -255,7 +255,7 @@ func writeResultsToFile(results []EmailResult, filename string) error {
255255func printResults (results []EmailResult ) error {
256256 // Print summary to stderr so JSON can be piped cleanly
257257 log .Printf ("Found emails from %d podcasts" , len (results ))
258-
258+
259259 foundEmails := 0
260260 totalEmails := 0
261261 for _ , result := range results {
0 commit comments