@@ -18,7 +18,6 @@ package main
18
18
19
19
import (
20
20
"fmt"
21
- "io/ioutil"
22
21
"os"
23
22
"path/filepath"
24
23
"regexp"
@@ -158,7 +157,7 @@ func findBioFiles(electionsPath string) ([]string, error) {
158
157
159
158
// countWords counts the number of words in a file
160
159
func countWords (filename string ) (int , error ) {
161
- content , err := ioutil .ReadFile (filename )
160
+ content , err := os .ReadFile (filename )
162
161
if err != nil {
163
162
return 0 , err
164
163
}
@@ -191,7 +190,7 @@ func validateFileNameAndGitHubID(filename string) error {
191
190
expectedUsername := matches [1 ]
192
191
193
192
// Read file content to extract GitHub ID
194
- content , err := ioutil .ReadFile (filename )
193
+ content , err := os .ReadFile (filename )
195
194
if err != nil {
196
195
return fmt .Errorf ("error reading file: %v" , err )
197
196
}
@@ -228,7 +227,7 @@ func validateFileNameAndGitHubID(filename string) error {
228
227
229
228
// validateTemplateCompliance checks if the bio follows the required template structure
230
229
func validateTemplateCompliance (filename string ) error {
231
- content , err := ioutil .ReadFile (filename )
230
+ content , err := os .ReadFile (filename )
232
231
if err != nil {
233
232
return fmt .Errorf ("error reading file: %v" , err )
234
233
}
0 commit comments