我使用与更新之前相同的凭据。它写道:
[08S01] 驱动程序无法使用安全套接字层 (SSL) 加密与 SQL Server 建立安全连接。错误:“PKIX 路径构建失败:
sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径”。
ClientConnectionId:ebe9ba87-4c34-4015-b6c8-a151bdf33a67 无法找到请求目标的有效证书路径
我需要创建 StructField,其中需要传递 Type 字段的reflect.Type 值。我想将其他类型(如reflect.Bool、reflect.Int)传递给将在StructField 构造中使用的函数。我无法使用下面的代码执行此操作
reflect.StructField{
Name: strings.Title(v.Name),
Type: reflect.Type(reflect.String),
Tag: reflect.StructTag(fmt.Sprintf(`xml:"%v,attr"`, v.Name)),
}
Run Code Online (Sandbox Code Playgroud)
因为它
Cannot convert an expression of the type 'Kind' to the type 'Type'
Run Code Online (Sandbox Code Playgroud)
我将如何实现它?