mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
format with gofumpt (#18184)
* gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
This commit is contained in:
parent
1d98d205f5
commit
54e9ee37a7
423 changed files with 1585 additions and 1758 deletions
|
@ -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"
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue