mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
[PR #1328] [MERGED] GO: Modernize Go modules by removing deprecated ioutil usage and adding proper version requirements.
#1918
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/google/brotli/pull/1328
Author: @akazwz
Created: 9/12/2025
Status: ✅ Merged
Merged: 10/6/2025
Merged by: @copybara-service[bot]
Base:
master← Head:go📝 Commits (3)
3d8eef2Update Go modules to require Go 1.21 and replace ioutil with io package in reader.go2c5f2d1Merge branch 'master' into goe4e56a3Add missing newline📊 Changes
3 files changed (+5 additions, -2 deletions)
View changed files
📝
go/brotli/go.mod(+2 -0)📝
go/brotli/reader.go(+1 -2)📝
go/cbrotli/go.mod(+2 -0)📄 Description
Summary
This PR modernizes the Go code by removing deprecated
ioutilpackage usage and adding proper Go version requirements to the module files.Changes
1. Remove deprecated
ioutilpackage usage"io/ioutil"import fromgo/brotli/reader.goioutil.ReadAll()withio.ReadAll()The
ioutilpackage has been deprecated since Go 1.16, with its functions moved toioandospackages for better organization.2. Add Go version requirements
go 1.21to bothgo/brotli/go.modandgo/cbrotli/go.modThis is necessary because:
min()builtin function introduced in Go 1.21io.ReadAll()requires Go 1.16+Benefits
Testing
Compatibility
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.