Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: fix linter

Stevena376dc4dd69a
diff --git a/store/db/mysql/workspace_setting.go b/store/db/mysql/workspace_setting.go
index cdf74df82..7f5f0142b 100644
--- a/store/db/mysql/workspace_setting.go
+++ b/store/db/mysql/workspace_setting.go
@@ -85,7 +85,7 @@ func (d *DB) UpsertWorkspaceSettingV1(ctx context.Context, upsert *storepb.Works
} else if upsert.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_TELEGRAM_INTEGRATION {
valueBytes, err = protojson.Marshal(upsert.GetTelegramIntegrationSetting())
} else {
- return nil, errors.New(fmt.Sprintf("unsupported workspace setting key: %s", upsert.Key.String()))
+ return nil, fmt.Errorf("unsupported workspace setting key: %v", upsert.Key)
}
if err != nil {
return nil, errors.Wrap(err, "failed to marshal workspace setting value")
diff --git a/store/db/postgres/workspace_setting.go b/store/db/postgres/workspace_setting.go
index 1a6102fa6..c69d260b3 100644
--- a/store/db/postgres/workspace_setting.go
+++ b/store/db/postgres/workspace_setting.go
@@ -95,7 +95,7 @@ func (d *DB) UpsertWorkspaceSettingV1(ctx context.Context, upsert *storepb.Works
} else if upsert.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_TELEGRAM_INTEGRATION {
valueBytes, err = protojson.Marshal(upsert.GetTelegramIntegrationSetting())
} else {
- return nil, errors.New(fmt.Sprintf("unsupported workspace setting key: %s", upsert.Key.String()))
+ return nil, fmt.Errorf("unsupported workspace setting key: %v", upsert.Key)
}
if err != nil {
return nil, errors.Wrap(err, "failed to marshal workspace setting value")
diff --git a/store/db/sqlite/workspace_setting.go b/store/db/sqlite/workspace_setting.go
index fa389d229..619f311ce 100644
--- a/store/db/sqlite/workspace_setting.go
+++ b/store/db/sqlite/workspace_setting.go
@@ -95,7 +95,7 @@ func (d *DB) UpsertWorkspaceSettingV1(ctx context.Context, upsert *storepb.Works
} else if upsert.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_TELEGRAM_INTEGRATION {
valueBytes, err = protojson.Marshal(upsert.GetTelegramIntegrationSetting())
} else {
- return nil, errors.New(fmt.Sprintf("unsupported workspace setting key: %s", upsert.Key.String()))
+ return nil, fmt.Errorf("unsupported workspace setting key: %v", upsert.Key)
}
if err != nil {
return nil, errors.Wrap(err, "failed to marshal workspace setting value")