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