s/Get(Master|Replica)X/Get\1/g (#29520)
Drop the legacy `X` suffix from `GetMasterX` and `GetReplicaX`. The presence of the suffix suggests there's a `non-X` version: but in fact we migrated these away a long time ago, so remove the cognitive overhead. As an aside, this additionally helps avoid trip up LLMs that interpret this as "something to fix".
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8b86e1276e
Коммит
5369f8b36b
@@ -982,7 +982,7 @@ func TestCreatePost(t *testing.T) {
|
||||
sqlStore := th.GetSqlStore()
|
||||
sql := fmt.Sprintf("select count(*) from Posts where Id = '%[1]s' or OriginalId = '%[1]s';", previewPost.Id)
|
||||
var val int64
|
||||
err2 := sqlStore.GetMasterX().Get(&val, sql)
|
||||
err2 := sqlStore.GetMaster().Get(&val, sql)
|
||||
require.NoError(t, err2)
|
||||
|
||||
require.EqualValues(t, int64(1), val)
|
||||
|
||||
Ссылка в новой задаче
Block a user