mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 11:18:02 +08:00
fix typo
This commit is contained in:
parent
6f93bd17f2
commit
790a651ac1
@ -57,7 +57,7 @@ const (
|
||||
OPTION_ALLOWEMPTY = 2
|
||||
|
||||
linkTypeMaster = 1
|
||||
linkTypeMSlave = 2
|
||||
linkTypeSlave = 2
|
||||
whereHolderWhere = 1
|
||||
whereHolderAnd = 2
|
||||
whereHolderOr = 3
|
||||
@ -198,7 +198,7 @@ func (m *Model) Master() *Model {
|
||||
// Note that it makes sense only if there's any slave node configured.
|
||||
func (m *Model) Slave() *Model {
|
||||
model := m.getModel()
|
||||
model.linkType = linkTypeMSlave
|
||||
model.linkType = linkTypeSlave
|
||||
return model
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ func (m *Model) getLink(master bool) Link {
|
||||
if master {
|
||||
linkType = linkTypeMaster
|
||||
} else {
|
||||
linkType = linkTypeMSlave
|
||||
linkType = linkTypeSlave
|
||||
}
|
||||
}
|
||||
switch linkType {
|
||||
@ -161,7 +161,7 @@ func (m *Model) getLink(master bool) Link {
|
||||
panic(err)
|
||||
}
|
||||
return link
|
||||
case linkTypeMSlave:
|
||||
case linkTypeSlave:
|
||||
link, err := m.db.GetSlave(m.schema)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
Loading…
Reference in New Issue
Block a user