forked from forgejo/forgejo
Revert "Add Debian package registry" (#24412)
Reverts go-gitea/gitea#22854
This commit is contained in:
parent
bf77e2163b
commit
c0ddec8a2a
57 changed files with 96 additions and 1995 deletions
|
@ -7,10 +7,11 @@ import (
|
|||
"bytes"
|
||||
"errors"
|
||||
"io"
|
||||
"math"
|
||||
"os"
|
||||
)
|
||||
|
||||
const maxInt = int(^uint(0) >> 1) // taken from bytes.Buffer
|
||||
|
||||
var (
|
||||
// ErrInvalidMemorySize occurs if the memory size is not in a valid range
|
||||
ErrInvalidMemorySize = errors.New("Memory size must be greater 0 and lower math.MaxInt32")
|
||||
|
@ -36,7 +37,7 @@ type FileBackedBuffer struct {
|
|||
|
||||
// New creates a file backed buffer with a specific maximum memory size
|
||||
func New(maxMemorySize int) (*FileBackedBuffer, error) {
|
||||
if maxMemorySize < 0 || maxMemorySize > math.MaxInt32 {
|
||||
if maxMemorySize < 0 || maxMemorySize > maxInt {
|
||||
return nil, ErrInvalidMemorySize
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue