mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-11 02:48:21 +00:00
16 lines
254 B
Go
16 lines
254 B
Go
package config
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
)
|
|
|
|
func (m *ConfigManager) DiscardPendingConfig() error {
|
|
m.pendingConfig = m.currentConfig.Clone()
|
|
|
|
err := os.Remove(m.pendingConfigFilePath)
|
|
if !errors.Is(err, os.ErrNotExist) {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|