Skip to content

Commit 3d3cd3c

Browse files
night556JacksonTian
authored andcommitted
remove product help document link
1 parent 6468f9f commit 3d3cd3c

File tree

4 files changed

+2
-22
lines changed

4 files changed

+2
-22
lines changed

meta/product.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,3 @@ func (a *Product) TryGetEndpoints(region string, client *sdk.Client) (endpoint s
110110
//}
111111
return
112112
}
113-
114-
func (a *Product) GetDocumentLink(lang string) string {
115-
//switch lang {
116-
//case "zh":
117-
// return "https://help.aliyun.com/document_detail/" + a.DocumentId + ".html"
118-
//case "en":
119-
// return "https://www.alibabacloud.com/help/doc-detail/" + a.DocumentId + ".html"
120-
//case "jp":
121-
// return "https://jp.alibabacloud.com/help/doc-detail/" + a.DocumentId + ".html"
122-
//default:
123-
// return "https://help.aliyun.com/document_detail/" + a.DocumentId + ".html"
124-
//}
125-
return "https://help.aliyun.com/api/" + strings.ToLower(a.Code)
126-
}

meta/product_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ func TestProduct_GetLowerCodeAndGetDocumentLink(t *testing.T) {
2626
}
2727
code := product.GetLowerCode()
2828
assert.Equal(t, code, "code")
29-
link := product.GetDocumentLink("link")
30-
assert.Equal(t, link, "https://help.aliyun.com/api/code")
3129
}
3230

3331
func TestProduct_GetEndpoint(t *testing.T) {

openapi/invoker.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
2424
"github.com/aliyun/aliyun-cli/cli"
2525
"github.com/aliyun/aliyun-cli/config"
26-
"github.com/aliyun/aliyun-cli/i18n"
2726
"github.com/aliyun/aliyun-cli/meta"
2827
)
2928

@@ -116,8 +115,7 @@ func (a *BasicInvoker) Init(ctx *cli.Context, product *meta.Product) error {
116115

117116
hint := "you can find it on https://help.aliyun.com"
118117
if product.Version != "" {
119-
hint = fmt.Sprintf("see '%s' or `aliyun help %s` get more information.",
120-
product.GetDocumentLink(i18n.GetLanguage()), product.GetLowerCode())
118+
hint = fmt.Sprintf("please use `aliyun help %s` get more information.", product.GetLowerCode())
121119
}
122120

123121
if a.request.Version == "" {

openapi/library.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ func (a *Library) PrintProducts() {
6868
}
6969

7070
func (a *Library) printProduct(product meta.Product) {
71-
cli.Printf(a.writer, " %s(%s)\t%s\t%s\n", product.Code, product.Version, product.Name["zh"],
72-
product.GetDocumentLink("zh"))
71+
cli.Printf(a.writer, " %s(%s)\t%s\n", product.Code, product.Version, product.Name["zh"])
7372
}
7473

7574
func (a *Library) PrintProductUsage(productCode string, withApi bool) error {
@@ -87,7 +86,6 @@ func (a *Library) PrintProductUsage(productCode string, withApi bool) error {
8786

8887
cli.Printf(a.writer, "\nProduct: %s (%s)\n", product.Code, product.Name[i18n.GetLanguage()])
8988
cli.Printf(a.writer, "Version: %s \n", product.Version)
90-
cli.Printf(a.writer, "Link: %s\n", product.GetDocumentLink(i18n.GetLanguage()))
9189

9290
if withApi {
9391
cli.PrintfWithColor(a.writer, cli.ColorOff, "\nAvailable Api List: \n")

0 commit comments

Comments
 (0)