mirror of
https://github.com/go-gitea/gitea
synced 2025-07-06 02:27:20 +00:00
Improve nuget/rubygems package registries (#34741)
1. Add some missing (optional) fields for nuget v2, and sort the fields to make it easier to maintain 2. Add missing "platform" for rubygems: `VERSION-PLATFORM` and `VERSION_PLATFORM` Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@ -34,7 +34,7 @@ type PortablePdbList []*PortablePdb
|
||||
|
||||
func (l PortablePdbList) Close() {
|
||||
for _, pdb := range l {
|
||||
pdb.Content.Close()
|
||||
_ = pdb.Content.Close()
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ func ExtractPortablePdb(r io.ReaderAt, size int64) (PortablePdbList, error) {
|
||||
|
||||
buf, err := packages.CreateHashedBufferFromReader(f)
|
||||
|
||||
f.Close()
|
||||
_ = f.Close()
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
@ -73,12 +73,12 @@ func ExtractPortablePdb(r io.ReaderAt, size int64) (PortablePdbList, error) {
|
||||
|
||||
id, err := ParseDebugHeaderID(buf)
|
||||
if err != nil {
|
||||
buf.Close()
|
||||
_ = buf.Close()
|
||||
return fmt.Errorf("Invalid PDB file: %w", err)
|
||||
}
|
||||
|
||||
if _, err := buf.Seek(0, io.SeekStart); err != nil {
|
||||
buf.Close()
|
||||
_ = buf.Close()
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user