Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit c2bad78

Browse files
authored
Merge pull request #344 from joshwget/remove-command
Add Remove command to ServiceConfigs
2 parents 80e2cf9 + d074e09 commit c2bad78

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

config/types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ func (c *ServiceConfigs) Add(name string, service *ServiceConfig) {
201201
c.mu.Unlock()
202202
}
203203

204+
// Remove removes the config with the specified name
205+
func (c *ServiceConfigs) Remove(name string) {
206+
c.mu.Lock()
207+
delete(c.m, name)
208+
c.mu.Unlock()
209+
}
210+
204211
// Len returns the len of the configs
205212
func (c *ServiceConfigs) Len() int {
206213
c.mu.RLock()

0 commit comments

Comments
 (0)