EoClient
更新时间:2026-06-05
新建EoClient
通过AK/SK方式访问EO
Go
1func GetDefaultClient() *eo.Client {
2 ak := "your_access_key_id"
3 sk := "your_secret_key_id"
4 endpoint := "https://geo.baidubce.com"
5
6 // ignore error in test, but you should handle error in dev
7 client, _ := eo.NewClient(ak, sk, endpoint)
8 return client
9}
以上代码片段展示了如何创建一个eo.Client对象,首先用户必须指定AK/SK,endpoint使用https://geo.baidubce.com即可。
评价此篇文章
