go 切片复制是地址复制

//此时Joins不起作用 
db.Table("book").
    Where("book.id = ?",1).
    Update("book.title","test")

生成sql为 `update book set book.title = 'test' where book.id = 1`  

//正确方法 
db.Table("book inner join category on book.category_id = category.id").
    Where("book.id = ?",1).
    Update("book.title","test")

生成sql为 `update book inner join category on book.category_id = category.id set book.title = 'test' where book.id = 1`  


package main

import (
	"fmt"
	"strings"
)

func main() {
	fmt.Println(len(strings.Split("","")))
	fmt.Println(len(strings.Split("",",")))
	fmt.Println(strings.Split("",",")[0] == "")
}

输出结果:

0
1
true