mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Implemented service delete command
This commit is contained in:
parent
7f2db58462
commit
543a9c666d
5 changed files with 123 additions and 4 deletions
|
@ -68,7 +68,13 @@ func (c *ServiceConfig) Save() error {
|
|||
for k, v := range c.ConfigValues {
|
||||
viper.Set(key+"."+k, v)
|
||||
}
|
||||
return viper.WriteConfig()
|
||||
return WriteConfig()
|
||||
}
|
||||
|
||||
// Deletes the service configuration from the config file
|
||||
func (c *ServiceConfig) Delete() error {
|
||||
key := "service." + c.Name
|
||||
return WriteConfig(key)
|
||||
}
|
||||
|
||||
type ServiceList []ServiceConfig
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue