@@ -18,7 +18,6 @@ package main
1818
1919import (
2020 "fmt"
21- "io/ioutil"
2221 "os"
2322 "path/filepath"
2423 "regexp"
@@ -158,7 +157,7 @@ func findBioFiles(electionsPath string) ([]string, error) {
158157
159158// countWords counts the number of words in a file
160159func countWords (filename string ) (int , error ) {
161- content , err := ioutil .ReadFile (filename )
160+ content , err := os .ReadFile (filename )
162161 if err != nil {
163162 return 0 , err
164163 }
@@ -191,7 +190,7 @@ func validateFileNameAndGitHubID(filename string) error {
191190 expectedUsername := matches [1 ]
192191
193192 // Read file content to extract GitHub ID
194- content , err := ioutil .ReadFile (filename )
193+ content , err := os .ReadFile (filename )
195194 if err != nil {
196195 return fmt .Errorf ("error reading file: %v" , err )
197196 }
@@ -228,7 +227,7 @@ func validateFileNameAndGitHubID(filename string) error {
228227
229228// validateTemplateCompliance checks if the bio follows the required template structure
230229func validateTemplateCompliance (filename string ) error {
231- content , err := ioutil .ReadFile (filename )
230+ content , err := os .ReadFile (filename )
232231 if err != nil {
233232 return fmt .Errorf ("error reading file: %v" , err )
234233 }
0 commit comments