Skip to content

Commit 31ece94

Browse files
committed
Fix lint
1 parent 36f2a6e commit 31ece94

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

modules/lfs/pointers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func IsPointerFile(buf *[]byte) *models.LFSMetaObject {
5454
return nil
5555
}
5656

57-
contentStore := &ContentStore{storage.LFS}
57+
contentStore := &ContentStore{ObjectStorage: storage.LFS}
5858
meta := &models.LFSMetaObject{Oid: oid, Size: size}
5959
exist, err := contentStore.Exists(meta)
6060
if err != nil || !exist {
@@ -66,6 +66,6 @@ func IsPointerFile(buf *[]byte) *models.LFSMetaObject {
6666

6767
// ReadMetaObject will read a models.LFSMetaObject and return a reader
6868
func ReadMetaObject(meta *models.LFSMetaObject) (io.ReadCloser, error) {
69-
contentStore := &ContentStore{storage.LFS}
69+
contentStore := &ContentStore{ObjectStorage: storage.LFS}
7070
return contentStore.Get(meta, 0)
7171
}

modules/lfs/server.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func getContentHandler(ctx *context.Context) {
188188
}
189189
}
190190

191-
contentStore := &ContentStore{storage.LFS}
191+
contentStore := &ContentStore{ObjectStorage: storage.LFS}
192192
content, err := contentStore.Get(meta, fromByte)
193193
if err != nil {
194194
// Errors are logged in contentStore.Get
@@ -289,7 +289,7 @@ func PostHandler(ctx *context.Context) {
289289
ctx.Resp.Header().Set("Content-Type", metaMediaType)
290290

291291
sentStatus := 202
292-
contentStore := &ContentStore{storage.LFS}
292+
contentStore := &ContentStore{ObjectStorage: storage.LFS}
293293
exist, err := contentStore.Exists(meta)
294294
if err != nil {
295295
log.Error("Unable to check if LFS OID[%s] exist on %s / %s. Error: %v", rv.Oid, rv.User, rv.Repo, err)
@@ -350,7 +350,7 @@ func BatchHandler(ctx *context.Context) {
350350
return
351351
}
352352

353-
contentStore := &ContentStore{storage.LFS}
353+
contentStore := &ContentStore{ObjectStorage: storage.LFS}
354354

355355
meta, err := repository.GetLFSMetaObjectByOid(object.Oid)
356356
if err == nil { // Object is found and exists
@@ -408,7 +408,7 @@ func PutHandler(ctx *context.Context) {
408408
return
409409
}
410410

411-
contentStore := &ContentStore{storage.LFS}
411+
contentStore := &ContentStore{ObjectStorage: storage.LFS}
412412
bodyReader := ctx.Req.Body().ReadCloser()
413413
defer bodyReader.Close()
414414
if err := contentStore.Put(meta, bodyReader); err != nil {
@@ -450,7 +450,7 @@ func VerifyHandler(ctx *context.Context) {
450450
return
451451
}
452452

453-
contentStore := &ContentStore{storage.LFS}
453+
contentStore := &ContentStore{ObjectStorage: storage.LFS}
454454
ok, err := contentStore.Verify(meta)
455455
if err != nil {
456456
// Error will be logged in Verify

routers/repo/lfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ type pointerResult struct {
620620
func createPointerResultsFromCatFileBatch(catFileBatchReader *io.PipeReader, wg *sync.WaitGroup, pointerChan chan<- pointerResult, repo *models.Repository, user *models.User) {
621621
defer wg.Done()
622622
defer catFileBatchReader.Close()
623-
contentStore := lfs.ContentStore{storage.LFS}
623+
contentStore := lfs.ContentStore{ObjectStorage: storage.LFS}
624624

625625
bufferedReader := bufio.NewReader(catFileBatchReader)
626626
buf := make([]byte, 1025)

0 commit comments

Comments
 (0)