package main import "runtime" func main() { println(runtime.GOOS) if runtime.GOOS == "linux" { //>> linux } if runtime.GOOS == "windows" { //>> windows } }
An upsert on a sharded collection must contain the shard key and have the simple collation. Update request: update 时 condition 参数没有带分片键值 导致以上错误 解决方法:update时提交键值到查询条件中