From 53cb8241f3b56901660df90f6a9a661de140dc18 Mon Sep 17 00:00:00 2001 From: StrongXscripts Date: Fri, 17 Oct 2025 01:31:46 +0500 Subject: [PATCH 1/2] Update README.md From 0659682cce155cf2babfd79b31afa41e843359d2 Mon Sep 17 00:00:00 2001 From: emoceon Date: Thu, 16 Oct 2025 22:38:42 +0100 Subject: [PATCH 2/2] update io util package --- go/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/go/main.go b/go/main.go index 5902097..8222b97 100644 --- a/go/main.go +++ b/go/main.go @@ -3,7 +3,7 @@ package main import ( "encoding/json" "fmt" - "io/ioutil" + "io" "log" "net/http" "os" @@ -80,7 +80,7 @@ func (client *GitHubClient) FetchContributors(owner, repo string) ([]GitHubUser, return nil, fmt.Errorf("API request failed with status: %d", resp.StatusCode) } - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return nil, fmt.Errorf("reading response: %w", err) } @@ -116,7 +116,7 @@ func (client *GitHubClient) FetchPullRequests(owner, repo string) ([]PullRequest return nil, fmt.Errorf("API request failed with status: %d", resp.StatusCode) } - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return nil, fmt.Errorf("reading response: %w", err) } @@ -183,7 +183,7 @@ func SaveStatsToFile(stats *HacktoberfestStats, filename string) error { return fmt.Errorf("marshaling stats: %w", err) } - if err := ioutil.WriteFile(filename, data, 0644); err != nil { + if err := os.WriteFile(filename, data, 0644); err != nil { return fmt.Errorf("writing file: %w", err) }