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
@@ -37,7 +37,7 @@ func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
store.GetMasterX().Close()
|
||||
store.GetMaster().Close()
|
||||
|
||||
for _, isMaster := range []bool{true, false} {
|
||||
handle := sql.OpenDB(driver.NewConnector(p.Driver, isMaster))
|
||||
@@ -51,7 +51,7 @@ func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model
|
||||
storetest.TestChannelStore(p.t, rctx, store, wrapper)
|
||||
storetest.TestBotStore(p.t, rctx, store, wrapper)
|
||||
|
||||
store.GetMasterX().Close()
|
||||
store.GetMaster().Close()
|
||||
}
|
||||
|
||||
// Use the API to instantiate the driver
|
||||
|
||||
Ссылка в новой задаче
Block a user