mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-12-06 00:05:30 +00:00
style: minor formatting in registry.go
This commit is contained in:
1 parent
9af4a53fe9
commit
5d63dfb0d1
1 file changed
+1
-5
@@ -15,7 +15,6 @@ type Registry struct {
|
||||
// ErrProviderNotFound is returned when a requested payment provider is not registered.
|
||||
var ErrProviderNotFound = infraerrors.NotFound("PROVIDER_NOT_FOUND", "payment provider not registered")
|
||||
|
||||
|
||||
// NewRegistry creates a new empty provider registry.
|
||||
func NewRegistry() *Registry {
|
||||
return &Registry{
|
||||
@@ -59,8 +58,7 @@ func (r *Registry) GetProviderByKey(key string) (Provider, error) {
|
||||
return nil, ErrProviderNotFound
|
||||
}
|
||||
|
||||
// GetProviderKey returns the provider key for the given payment type,
|
||||
// or empty string if not found.
|
||||
// GetProviderKey returns the provider key for the given payment type, or empty string if not found.
|
||||
func (r *Registry) GetProviderKey(t PaymentType) string {
|
||||
r.mu.RLock()
|
||||
defer r.mu.RUnlock()
|
||||
@@ -88,5 +86,3 @@ func (r *Registry) Clear() {
|
||||
defer r.mu.Unlock()
|
||||
r.providers = make(map[PaymentType]Provider)
|
||||
}
|
||||
|
||||
// Clear removes all registered providers.
|
||||
Reference in new issue
Block a user