chore(all): return concrete types, accept interfaces
- Remove exported interfaces unused locally - Define interfaces to accept arguments - Return concrete types, not interfaces
This commit is contained in:
@@ -6,22 +6,8 @@ import (
|
||||
"github.com/qdm12/gluetun/internal/configuration/settings"
|
||||
)
|
||||
|
||||
type SettingsGetSetter interface {
|
||||
SettingsGetter
|
||||
SettingsSetter
|
||||
}
|
||||
|
||||
type SettingsGetter interface {
|
||||
GetSettings() (settings settings.DNS)
|
||||
}
|
||||
|
||||
func (l *Loop) GetSettings() (settings settings.DNS) { return l.state.GetSettings() }
|
||||
|
||||
type SettingsSetter interface {
|
||||
SetSettings(ctx context.Context, settings settings.DNS) (
|
||||
outcome string)
|
||||
}
|
||||
|
||||
func (l *Loop) SetSettings(ctx context.Context, settings settings.DNS) (
|
||||
outcome string) {
|
||||
return l.state.SetSettings(ctx, settings)
|
||||
|
||||
Reference in New Issue
Block a user