From c53a1998c589a544b25d53f6e6fdf0f24a4df25b Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Thu, 2 Feb 2023 21:25:25 +0800 Subject: all: replace `interface{}` with `any` (#7330) Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- internal/db/login_source_files.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/db/login_source_files.go') diff --git a/internal/db/login_source_files.go b/internal/db/login_source_files.go index 385b7402..494f828a 100644 --- a/internal/db/login_source_files.go +++ b/internal/db/login_source_files.go @@ -220,7 +220,7 @@ type loginSourceFileStore interface { // SetGeneral sets new value to the given key in the general (default) section. SetGeneral(name, value string) // SetConfig sets new values to the "config" section. - SetConfig(cfg interface{}) error + SetConfig(cfg any) error // Save persists values to file system. Save() error } @@ -236,7 +236,7 @@ func (f *loginSourceFile) SetGeneral(name, value string) { f.file.Section("").Key(name).SetValue(value) } -func (f *loginSourceFile) SetConfig(cfg interface{}) error { +func (f *loginSourceFile) SetConfig(cfg any) error { return f.file.Section("config").ReflectFrom(cfg) } -- cgit v1.2.3