Skip to content

Commit

Permalink
Removed some vestigial code related to Range bounds checks (go-gitea#…
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-peterson authored Jul 28, 2022
1 parent ae52df6 commit 4604048
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions modules/lfs/content_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"crypto/sha256"
"encoding/hex"
"errors"
"fmt"
"hash"
"io"
"os"
Expand All @@ -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
Expand Down

0 comments on commit 4604048

Please sign in to comment.