我正在使用azure包进行go,以查询服务终结点列表。
我调用函数: func (client ClientImpl) GetServiceEndpoints(ctx context.Context,args GetServiceEndpointsArgs) ([]ServiceEndpoint,error)
服务端点的返回类型定义如下:https://pkg.go.dev/github.com/microsoft/azure-devops-go-api/azuredevops@v1.0.0-b5/serviceendpoint#ServiceEndpoint
从模块获得的返回值为uuid格式。我如何才能获得像resourceId=90d8caad-7150-4a36-9075-597479fe72f1这样的可用格式?

如您所见,数组中的每个值都包含azure中的实际ID的一部分。
发布于 2022-03-04 20:03:26
UUID类型有一个串法
func (uuid UUID) String() stringhttps://stackoverflow.com/questions/71356643
复制相似问题