If we found c, then return c

Signed-off-by: ZhiFeng Hu <hufeng1987@gmail.com>
This commit is contained in:
ZhiFeng Hu
2015-11-06 21:21:57 +08:00
parent 3fa25044d9
commit 88ef8dd9eb

View File

@ -58,7 +58,7 @@ func (c *Col) String() string {
func FindCol(cols []*Col, name string) (c *Col) {
for _, c := range cols {
if strings.EqualFold(c.Name.O, name) {
return
return c
}
}
return nil