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
@@ -222,7 +222,7 @@ func (h *MainHelper) PreloadMigrations() {
|
||||
panic(fmt.Errorf("cannot read file: %v", err))
|
||||
}
|
||||
}
|
||||
handle := h.SQLStore.GetMasterX()
|
||||
handle := h.SQLStore.GetMaster()
|
||||
_, err = handle.Exec(string(buf))
|
||||
if err != nil {
|
||||
panic(errors.Wrap(err, "Error preloading migrations. Check if you have &multiStatements=true in your DSN if you are using MySQL. Or perhaps the schema changed? If yes, then update the warmup files accordingly"))
|
||||
|
||||
Ссылка в новой задаче
Block a user