diff options
Diffstat (limited to 'modules/storage')
-rw-r--r-- | modules/storage/local.go | 4 | ||||
-rw-r--r-- | modules/storage/minio.go | 4 | ||||
-rw-r--r-- | modules/storage/storage.go | 6 |
3 files changed, 5 insertions, 9 deletions
diff --git a/modules/storage/local.go b/modules/storage/local.go index 54e0d0563d..022e6186d4 100644 --- a/modules/storage/local.go +++ b/modules/storage/local.go @@ -15,9 +15,7 @@ import ( "code.gitea.io/gitea/modules/util" ) -var ( - _ ObjectStorage = &LocalStorage{} -) +var _ ObjectStorage = &LocalStorage{} // LocalStorageType is the type descriptor for local storage const LocalStorageType Type = "local" diff --git a/modules/storage/minio.go b/modules/storage/minio.go index f78ba6aa27..f35f4092a9 100644 --- a/modules/storage/minio.go +++ b/modules/storage/minio.go @@ -122,7 +122,7 @@ func (m *MinioStorage) buildMinioPath(p string) string { // Open open a file func (m *MinioStorage) Open(path string) (Object, error) { - var opts = minio.GetObjectOptions{} + opts := minio.GetObjectOptions{} object, err := m.client.GetObject(m.ctx, m.bucket, m.buildMinioPath(path), opts) if err != nil { return nil, convertMinioErr(err) @@ -206,7 +206,7 @@ func (m *MinioStorage) URL(path, name string) (*url.URL, error) { // IterateObjects iterates across the objects in the miniostorage func (m *MinioStorage) IterateObjects(fn func(path string, obj Object) error) error { - var opts = minio.GetObjectOptions{} + opts := minio.GetObjectOptions{} lobjectCtx, cancel := context.WithCancel(m.ctx) defer cancel() for mObjInfo := range m.client.ListObjects(lobjectCtx, m.bucket, minio.ListObjectsOptions{ diff --git a/modules/storage/storage.go b/modules/storage/storage.go index 2532ceb35d..f11e1ac743 100644 --- a/modules/storage/storage.go +++ b/modules/storage/storage.go @@ -16,10 +16,8 @@ import ( "code.gitea.io/gitea/modules/setting" ) -var ( - // ErrURLNotSupported represents url is not supported - ErrURLNotSupported = errors.New("url method not supported") -) +// ErrURLNotSupported represents url is not supported +var ErrURLNotSupported = errors.New("url method not supported") // ErrInvalidConfiguration is called when there is invalid configuration for a storage type ErrInvalidConfiguration struct { |