aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorPhilip Peterson <philip-peterson@users.noreply.github.com>2022-07-27 23:04:36 -0400
committerGitHub <noreply@github.com>2022-07-28 11:04:36 +0800
commit4604048010347ea946ae57628d694a631787ab17 (patch)
tree48bf2d5c469a9dd9e8656d50e2e20929600ad37e /modules
parentae52df6a64477bcd5076ddddbee64bb22b3897a0 (diff)
downloadgitea-4604048010347ea946ae57628d694a631787ab17.tar.gz
gitea-4604048010347ea946ae57628d694a631787ab17.zip
Removed some vestigial code related to Range bounds checks (#20312)
Diffstat (limited to 'modules')
-rw-r--r--modules/lfs/content_store.go16
1 files changed, 0 insertions, 16 deletions
diff --git a/modules/lfs/content_store.go b/modules/lfs/content_store.go
index c794a1fecc..0eedf4de17 100644
--- a/modules/lfs/content_store.go
+++ b/modules/lfs/content_store.go
@@ -8,7 +8,6 @@ import (
"crypto/sha256"
"encoding/hex"
"errors"
- "fmt"
"hash"
"io"
"os"
@@ -24,21 +23,6 @@ var (
ErrSizeMismatch = errors.New("Content size does not match")
)
-// ErrRangeNotSatisfiable represents an error which request range is not satisfiable.
-type ErrRangeNotSatisfiable struct {
- FromByte int64
-}
-
-// IsErrRangeNotSatisfiable returns true if the error is an ErrRangeNotSatisfiable
-func IsErrRangeNotSatisfiable(err error) bool {
- _, ok := err.(ErrRangeNotSatisfiable)
- return ok
-}
-
-func (err ErrRangeNotSatisfiable) Error() string {
- return fmt.Sprintf("Requested range %d is not satisfiable", err.FromByte)
-}
-
// ContentStore provides a simple file system based storage.
type ContentStore struct {
storage.ObjectStorage