Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Remove unused StorageMeta, improve efficiency of SupportedSchemes() b…
Browse files Browse the repository at this point in the history
…y using a RLock() not a RW lock.
  • Loading branch information
Brian Maher committed Aug 1, 2019
1 parent fb75d51 commit 3af186f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions storage/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ func NewStorageError(code StorageErrorCode, msg string, cause error) *StorageErr
}
}

type StorageMeta struct {
Key string
Metadata map[string]string
ContentLength int64
}

type StorageSink func(io.Writer) error
type StorageSrc func(io.Reader) error

Expand Down
4 changes: 2 additions & 2 deletions storage/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func RegisterFactory(scheme string, factory BlobStorageFactory) {
}

func SupportedSchemes() []string {
factoriesMu.Lock()
defer factoriesMu.Unlock()
factoriesMu.RLock()
defer factoriesMu.RUnlock()
var list []string
for scheme := range factories {
list = append(list, scheme)
Expand Down

0 comments on commit 3af186f

Please sign in to comment.