如何使用 Azure devops GO 实现将 uuid 值转换为字符串

How to convert uuid value to string using Azure devops GO implementation

我正在使用 azure devops 包来查询服务端点列表。

我调用函数: func (client ClientImpl) GetServiceEndpoints(ctx context.Context, args GetServiceEndpointsArgs) ([]ServiceEndpoint, error)

return类型的serviceendpoint定义如下 https://pkg.go.dev/github.com/microsoft/azure-devops-go-api/azuredevops@v1.0.0-b5/serviceendpoint#ServiceEndpoint

我从模块中得到的return值是uuid格式。 我怎样才能把它作为一种可用的格式,比如 resourceId=90d8caad-7150-4a36-9075-597479fe72f1

如您所见,数组中的每个值都包含了 azure devops 中的一部分实际 ID。

UUID 类型有 String method:

func (uuid UUID) String() string