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