Skip to content

Commit 071fd10

Browse files
authored
dev: updates internal code borrowed from Go (#5098)
1 parent 3592be6 commit 071fd10

40 files changed

+1556
-520
lines changed

.golangci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,10 @@ issues:
222222
exclude-dirs:
223223
- test/testdata_etc # test files
224224
- internal/cache # extracted from Go code
225-
- internal/renameio # extracted from Go code
226225
- internal/robustio # extracted from Go code
226+
- internal/mmap # extracted from Go code
227+
- internal/quoted # extracted from Go code
228+
- internal/testenv # extracted from Go code
227229

228230
run:
229231
timeout: 5m

go.mod

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ require (
8787
github.com/polyfloyd/go-errorlint v1.6.0
8888
github.com/quasilyte/go-ruleguard/dsl v0.3.22
8989
github.com/raeperd/recvcheck v0.1.2
90+
github.com/rogpeppe/go-internal v1.13.1
9091
github.com/ryancurrah/gomodguard v1.3.5
9192
github.com/ryanrolds/sqlclosecheck v0.5.1
9293
github.com/sanposhiho/wastedassign/v2 v2.0.7
@@ -127,6 +128,7 @@ require (
127128
go-simpler.org/sloglint v0.7.2
128129
go.uber.org/automaxprocs v1.6.0
129130
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
131+
golang.org/x/sys v0.26.0
130132
golang.org/x/tools v0.26.0
131133
gopkg.in/yaml.v3 v3.0.1
132134
honnef.co/go/tools v0.5.1
@@ -193,7 +195,6 @@ require (
193195
golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0 // indirect
194196
golang.org/x/mod v0.21.0 // indirect
195197
golang.org/x/sync v0.8.0 // indirect
196-
golang.org/x/sys v0.26.0 // indirect
197198
golang.org/x/text v0.18.0 // indirect
198199
google.golang.org/protobuf v1.34.2 // indirect
199200
gopkg.in/ini.v1 v1.67.0 // indirect

go.sum

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/cache/LICENSE

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2009 The Go Authors. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above
10+
copyright notice, this list of conditions and the following disclaimer
11+
in the documentation and/or other materials provided with the
12+
distribution.
13+
* Neither the name of Google Inc. nor the names of its
14+
contributors may be used to endorse or promote products derived from
15+
this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)