Skip to content

Commit 9005884

Browse files
committed
fixbug
1 parent 4aa30a4 commit 9005884

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

base/config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ const DefaultProfile = "default"
4141
//Version 版本号
4242
const Version = "0.1.33"
4343

44+
var UserAgent = fmt.Sprintf("UCloud-CLI/%s", Version)
45+
4446
var InCloudShell = os.Getenv("CLOUD_SHELL") == "true"
4547

4648
//ConfigIns 配置实例, 程序加载时生成
@@ -703,7 +705,7 @@ func GetBizClient(ac *AggConfig) (*Client, error) {
703705
ClientConfig = &sdk.Config{
704706
BaseUrl: ac.BaseURL,
705707
Timeout: timeout,
706-
UserAgent: fmt.Sprintf("UCloud-CLI/%s", Version),
708+
UserAgent: UserAgent,
707709
LogLevel: log.FatalLevel,
708710
Region: ac.Region,
709711
ProjectId: ac.ProjectID,

base/log.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func (t Tracer) Send(logs []string) error {
277277
}
278278

279279
client := &http.Client{}
280-
ua := fmt.Sprintf("GO/%s GO-SDK/%s %s", runtime.Version(), version.Version, ClientConfig.UserAgent)
280+
ua := fmt.Sprintf("GO/%s GO-SDK/%s %s", runtime.Version(), version.Version, UserAgent)
281281
req, err := http.NewRequest("POST", t.DasUrl, bytes.NewReader(body))
282282
req.Header.Add("Origin", "https://sdk.ucloud.cn")
283283
req.Header.Add("User-Agent", ua)

cmd/doc_md.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ func NewCmdDoc(out io.Writer) *cobra.Command {
5757
log.Fatal(err)
5858
}
5959
case "douku":
60-
prefix := "developer/cli/cmd/"
60+
prefix := "cli/cmd/"
6161
err := doc.GenDoukuTree(rootCmd, dir, prefix)
62-
printCmdIndex(rootCmd, 0, "developer/cli/cmd")
62+
printCmdIndex(rootCmd, 0, "/cli/cmd")
6363
if err != nil {
6464
log.Fatal(err)
6565
}

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA=
12
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
23
github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=
34
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=

0 commit comments

Comments
 (0)