#golang 可变参数踩坑func (c *Conn) HSETCommon(ctx context.Context, key string, values ...interface{}) error { err := c.Client.HSet(ctx, key, values).Err() // 应该是values..., 否则内部应该[]interface{}接 if err != nil { logger.Error("[HSETCommon] failed", zap.String("key", key), zap.Any(key, values), zap.Error(err)) } return err } // 原本go-redis 内部HSet func (c cmdable) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd { } 错误就在values 传递时候