@@ -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"
@@ -157,7 +156,7 @@ func findBioFiles(electionsPath string) ([]string, error) {
157
156
158
157
// countWords counts the number of words in a file
159
158
func countWords (filename string ) (int , error ) {
160
- content , err := ioutil .ReadFile (filename )
159
+ content , err := os .ReadFile (filename )
161
160
if err != nil {
162
161
return 0 , err
163
162
}
@@ -190,7 +189,7 @@ func validateFileNameAndGitHubID(filename string) error {
190
189
expectedUsername := matches [1 ]
191
190
192
191
// Read file content to extract GitHub ID
193
- content , err := ioutil .ReadFile (filename )
192
+ content , err := os .ReadFile (filename )
194
193
if err != nil {
195
194
return fmt .Errorf ("error reading file: %v" , err )
196
195
}
@@ -227,7 +226,7 @@ func validateFileNameAndGitHubID(filename string) error {
227
226
228
227
// validateTemplateCompliance checks if the bio follows the required template structure
229
228
func validateTemplateCompliance (filename string ) error {
230
- content , err := ioutil .ReadFile (filename )
229
+ content , err := os .ReadFile (filename )
231
230
if err != nil {
232
231
return fmt .Errorf ("error reading file: %v" , err )
233
232
}
0 commit comments