From b0d04fb31fb7675c341ea11a9b0be4668b2eb9ce Mon Sep 17 00:00:00 2001 From: peze <954152927@qq.com> Date: Sat, 9 Nov 2024 18:03:09 +0800 Subject: [PATCH] change the error generate logic --- .github/workflows/node.js.yml | 5 +- lib/generator.js | 75 +++++++--- package.json | 3 +- test/fixtures/annotation/client.go | 2 +- test/fixtures/api/client.go | 2 +- test/fixtures/builtin/client.go | 2 +- test/fixtures/comment/client.go | 2 +- test/fixtures/complex/client.go | 70 +++++---- test/fixtures/complex/main.dara | 8 ++ test/fixtures/exception/client.go | 160 ++++++++++----------- test/fixtures/extends/client.go | 2 +- test/fixtures/extendsWithoutInit/client.go | 2 +- test/fixtures/function/client.go | 2 +- test/fixtures/import/client.go | 2 +- test/fixtures/interface/client.go | 2 +- test/fixtures/interface/spi.go | 14 +- test/fixtures/main/main.go | 2 +- test/fixtures/model/client.go | 14 +- test/fixtures/model/client_no_omit.go | 14 +- test/fixtures/multi/sdk/api.go | 2 +- test/fixtures/multi/sdk/client.go | 2 +- test/fixtures/multi/sdk/user.go | 2 +- test/fixtures/multi/sdk/util.go | 2 +- test/fixtures/statements/client.go | 2 +- test/fixtures/tea/client.go | 2 +- test/fixtures/try/client.go | 62 ++++---- test/fixtures/typedef/client.go | 2 +- test/fixtures/yield/client.go | 2 +- 28 files changed, 255 insertions(+), 206 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 37f8887..a4dd890 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -27,4 +27,7 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm install - run: npm run ci - - run: npm run test + - name: Upload Coverage Report + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} # required diff --git a/lib/generator.js b/lib/generator.js index 22f9e9b..89efa47 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -16,7 +16,7 @@ const getBuiltin = require('./builtin'); const { _name, _format, _string, _type, _initValue, _avoidReserveName, _importFilter, _avoidVariableKeywords, _setExtendFunc, _isFilterType, _getAttr, _setValueFunc, _vid, _pointerType, _lowerFirst, _escape, - _isBinaryOp, _upperFirst, _isIterator, _modelName, _extendFieldName, _field + _isBinaryOp, _upperFirst, _isIterator, _modelName, } = require('./helper'); function getAttr(node, attrName) { @@ -171,7 +171,9 @@ class Visitor { for (let i = 0; i < imports.length; i++) { const item = imports[i]; const aliasId = _name(item); - const moduleDir = this.config.libraries[aliasId]; + const main = item.mainModule; + const inner = item.module; + const moduleDir = main ? this.config.libraries[main] : this.config.libraries[aliasId]; const innerPath = item.innerPath; if (innerPath) { @@ -234,7 +236,14 @@ class Visitor { goPkg: importTeaFile.go }); } - this.importPackages += ` ${_importFilter(aliasId.toLowerCase())} "${pkgName}"\n`; + if(inner) { + const mainPath = pkgName.substring(0, pkgName.lastIndexOf('/')); + const innerPath = importTeaFile.exports[inner].replace(/(\.tea)$|(\.spec)$|(\.dara)$/gi, ''); + const pkgPath = path.join(mainPath, innerPath); + this.importPackages += ` ${_importFilter(aliasId.toLowerCase())} "${pkgPath}"\n`; + } else { + this.importPackages += ` ${_importFilter(aliasId.toLowerCase())} "${pkgName}"\n`; + } } this.goPackages = pack.join('\n'); } @@ -351,6 +360,8 @@ class Visitor { ast.innerModule = new Map(); this.comments = ast.comments; + this.predefined = ast.models; + this.usedExternException = ast.usedExternException; this.builtin = getBuiltin(this); this.builtinModule = []; this.tryFunc = []; @@ -1160,13 +1171,16 @@ class Visitor { visitType(ast, level) { if (ast.type === 'moduleModel') { - this.emit(`*${_importFilter(_name(ast.path[0]).toLowerCase())}`); - for (let i = 1; i < ast.path.length; i++) { - if (i === 1) { - this.emit(`.`); - } - this.emit(`${_format(_name(ast.path[i]))}`); - } + const [ mainId, ...rest ] = ast.path; + let moduleName = _importFilter(_name(ast.path[0]).toLowerCase()); + let modelName = rest.map(node => { + return _upperFirst(_name(node)); + }).join(''); + const externEx = this.usedExternException.get(_name(mainId)); + if (externEx && externEx.has(modelName)) { + modelName += 'Error'; + } + this.emit(`*${moduleName}.${_format(modelName)}`); } else if (ast.type === 'moduleTypedef') { this.emit(`*`); for (let i = 1; i < ast.path.length; i++) { @@ -1484,9 +1498,9 @@ class Visitor { this.builtinModule.push({ path: 'fmt' }); - this.emit(`func (err ${structName}) Error() string {\n`, level); + this.emit(`func (err ${structName}Error) Error() string {\n`, level); this.emit('if err.Message == nil {\n', level + 1); - this.emit(`str := fmt.Sprintf("${structName}:\\n Name: %s\\n Code: %s\\n",\n`, level + 2); + this.emit(`str := fmt.Sprintf("${structName}Error:\\n Name: %s\\n Code: %s\\n",\n`, level + 2); this.emit('dara.StringValue(err.Name), dara.StringValue(err.Code))\n', level + 3); this.emit('err.Message = dara.String(str)\n', level + 2); this.emit(`}\n`, level + 1); @@ -1502,13 +1516,14 @@ class Visitor { for (let i = 0; i < ast.nodes.length; i++) { const node = ast.nodes[i]; - this.visitGetFunc(node, structName, level); + this.visitGetFunc(node, structName, type, level); } } - visitGetFunc(ast, structName, level = 0){ + visitGetFunc(ast, structName, type = 'model',level = 0){ const fieldName = _format(_name(ast.fieldName)); - this.emit(`func (s *${structName}) Get${fieldName}() `, level); + this.emit(`func (s *${structName}${type === 'model' ? '' : 'Error'}) Get${fieldName}() `, level); + structName = structName + _format(fieldName); this.visitFieldType(ast, structName, [], [], level); this.emit(' {\n'); this.emit(`return s.${fieldName}\n`, level + 1); @@ -1646,6 +1661,9 @@ class Visitor { } this.emit(`${_modelName(_format(_name(extendOn)))}`); } + if(type === 'exception') { + this.emit('Error'); + } this.emit('\n'); } @@ -1714,7 +1732,7 @@ class Visitor { this.visitAnnotation(ast.annotation, level); let comments = DSL.comment.getFrontComments(this.comments, ast.tokenRange[0]); this.visitComments(comments, level); - this.emit(`type ${exceptionName} struct {\n`, level); + this.emit(`type ${exceptionName}Error struct {\n`, level); this.visitExtendOn(ast.extendOn, level + 1, 'exception'); this.dealExtendFileds(ast.exceptionBody); this.visitExceptionBody(ast.exceptionBody, exceptionName, level + 1); @@ -1723,7 +1741,7 @@ class Visitor { visitExceptionInterface(ast, level) { assert.equal(ast.type, 'exception'); const exceptionName = _upperFirst(_name(ast.exceptionName)); - this.emit(`type i${exceptionName} interface {\n`, level); + this.emit(`type i${exceptionName}Error interface {\n`, level); this.visitExtendOn(ast.extendOn, level + 1, 'exception'); this.visitExceptionInterfceBody(ast.exceptionBody, exceptionName, level + 1); this.emit('}\n\n', level); @@ -1735,7 +1753,7 @@ class Visitor { const node = ast.nodes[i]; const fieldName = _format(_name(node.fieldName)); this.emit(`Get${fieldName}() `, level); - this.visitFieldType(node, structName, [], [], level); + this.visitFieldType(node, structName + fieldName, [], [], level); this.emit('\n'); } } @@ -1787,7 +1805,7 @@ class Visitor { this.emit(`) *${structName}\n`); } this.emit(`Get${fieldName}() `, level); - this.visitFieldType(node, structName, [], [], level); + this.visitFieldType(node, itemName, [], [], level); this.emit('\n'); } } @@ -2603,15 +2621,23 @@ class Visitor { visitConstructModel(ast, level, env) { assert.equal(ast.type, 'construct_model'); - let modelName; + let modelName = ''; if ((ast.inferred && ast.inferred.moduleName) || ast.aliasId.isModule) { - modelName = `${_format(_name(ast.aliasId)).toLowerCase()}.`; + const moduleName = _format(_name(ast.aliasId)).toLowerCase(); for (let i = 0; i < ast.propertyPath.length; i++) { const item = ast.propertyPath[i]; modelName += _format(_name(item)); } + const externEx = this.usedExternException.get(_name(ast.aliasId)); + if (externEx && externEx.has(modelName)) { + modelName += 'Error'; + } + modelName = `${moduleName}.${modelName}`; } else { modelName = _modelName(_format(_name(ast.aliasId))); + if (this.predefined[modelName] && this.predefined[modelName].isException) { + modelName += 'Error'; + } } if (ast.object && ast.object.fields.length > 0) { const fields = ast.object.fields; @@ -3520,7 +3546,7 @@ class Visitor { if (this.importPackages !== '') { this.header += `${this.importPackages}`; } - this.header += ` dara "github.com/alibabacloud-go/tea/tea"\n`; + this.header += ` "github.com/alibabacloud-go/tea/dara"\n`; const modules = new Set(); this.builtinModule.forEach(builtinModule => { let content = ''; @@ -3721,6 +3747,11 @@ class Visitor { return this.typedef[type.lexeme].type; } } + + if (this.predefined[_name(type)] && this.predefined[_name(type)].isException) { + return `${_name(type)}Error`; + } + return _name(type); } } diff --git a/package.json b/package.json index bcf817b..8a06d2f 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,7 @@ "eslint": "^6", "expect.js": "^0.3.1", "mocha": "^10.4.0", - "nyc": "^15.1.0", - "codecov": "^3" + "nyc": "^15.1.0" }, "dependencies": { "@darabonba/annotation-parser": "^1.0.0", diff --git a/test/fixtures/annotation/client.go b/test/fixtures/annotation/client.go index b3da7a0..7584414 100644 --- a/test/fixtures/annotation/client.go +++ b/test/fixtures/annotation/client.go @@ -1,7 +1,7 @@ package client import ( - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/api/client.go b/test/fixtures/api/client.go index c35dbe0..e23e83a 100644 --- a/test/fixtures/api/client.go +++ b/test/fixtures/api/client.go @@ -2,7 +2,7 @@ package client import ( - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/builtin/client.go b/test/fixtures/builtin/client.go index c25e1cd..0ae0b99 100644 --- a/test/fixtures/builtin/client.go +++ b/test/fixtures/builtin/client.go @@ -3,7 +3,7 @@ package client import ( "io" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" "encoding/hex" "encoding/base64" "fmt" diff --git a/test/fixtures/comment/client.go b/test/fixtures/comment/client.go index f28c26f..86e1022 100644 --- a/test/fixtures/comment/client.go +++ b/test/fixtures/comment/client.go @@ -3,7 +3,7 @@ package client import ( source "github.com/aliyun/darabonba-go-generator/test" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/complex/client.go b/test/fixtures/complex/client.go index 6a8edcf..19672bb 100644 --- a/test/fixtures/complex/client.go +++ b/test/fixtures/complex/client.go @@ -5,7 +5,7 @@ import ( "github.com/alibabacloud-go/tea" "io" source "github.com/aliyun/darabonba-go-generator/test" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" "fmt" ) @@ -22,9 +22,9 @@ type iComplexRequest interface { SetMapList(v []map[string]interface{}) *ComplexRequest GetMapList() []map[string]interface{} SetHeader(v *ComplexRequestHeader) *ComplexRequest - GetHeader() *ComplexRequest + GetHeader() *ComplexRequestHeader SetConfigs(v *ComplexRequestConfigs) *ComplexRequest - GetConfigs() *ComplexRequest + GetConfigs() *ComplexRequestConfigs SetNum(v int) *ComplexRequest GetNum() *int SetI64(v int64) *ComplexRequest @@ -90,7 +90,7 @@ type iComplexRequest interface { SetInstance(v *source.RequestInstance) *ComplexRequest GetInstance() *source.RequestInstance SetPart(v []*ComplexRequestPart) *ComplexRequest - GetPart() []*ComplexRequest + GetPart() []*ComplexRequestPart } type ComplexRequest struct { @@ -187,11 +187,11 @@ func (s *ComplexRequest) GetMapList() []map[string]interface{} { return s.MapList } -func (s *ComplexRequest) GetHeader() *ComplexRequest { +func (s *ComplexRequest) GetHeader() *ComplexRequestHeader { return s.Header } -func (s *ComplexRequest) GetConfigs() *ComplexRequest { +func (s *ComplexRequest) GetConfigs() *ComplexRequestConfigs { return s.Configs } @@ -323,7 +323,7 @@ func (s *ComplexRequest) GetInstance() *source.RequestInstance { return s.Instance } -func (s *ComplexRequest) GetPart() []*ComplexRequest { +func (s *ComplexRequest) GetPart() []*ComplexRequestPart { return s.Part } @@ -662,12 +662,12 @@ func (s *Response) SetInstance(v *ComplexRequestPart) *Response { return s } -type iErr1 interface { +type iErr1Error interface { dara.BaseError GetData() map[string]*string } -type Err1 struct { +type Err1Error struct { dara.BaseError Name *string `` Message *string `` @@ -676,41 +676,41 @@ type Err1 struct { Data map[string]*string ` require:"true"` } -func (err Err1) Error() string { +func (err Err1Error) Error() string { if err.Message == nil { - str := fmt.Sprintf("Err1:\n Name: %s\n Code: %s\n", + str := fmt.Sprintf("Err1Error:\n Name: %s\n Code: %s\n", dara.StringValue(err.Name), dara.StringValue(err.Code)) err.Message = dara.String(str) } return dara.StringValue(err.Message) } -func (s *Err1) GetName() *string { +func (s *Err1Error) GetName() *string { return s.Name } -func (s *Err1) GetMessage() *string { +func (s *Err1Error) GetMessage() *string { return s.Message } -func (s *Err1) GetCode() *string { +func (s *Err1Error) GetCode() *string { return s.Code } -func (s *Err1) GetStack() *string { +func (s *Err1Error) GetStack() *string { return s.Stack } -func (s *Err1) GetData() map[string]*string { +func (s *Err1Error) GetData() map[string]*string { return s.Data } -type iErr2 interface { +type iErr2Error interface { dara.BaseError GetAccessErrMessage() *string } -type Err2 struct { +type Err2Error struct { dara.BaseError Name *string `` Message *string `` @@ -719,32 +719,32 @@ type Err2 struct { AccessErrMessage *string ` require:"true"` } -func (err Err2) Error() string { +func (err Err2Error) Error() string { if err.Message == nil { - str := fmt.Sprintf("Err2:\n Name: %s\n Code: %s\n", + str := fmt.Sprintf("Err2Error:\n Name: %s\n Code: %s\n", dara.StringValue(err.Name), dara.StringValue(err.Code)) err.Message = dara.String(str) } return dara.StringValue(err.Message) } -func (s *Err2) GetName() *string { +func (s *Err2Error) GetName() *string { return s.Name } -func (s *Err2) GetMessage() *string { +func (s *Err2Error) GetMessage() *string { return s.Message } -func (s *Err2) GetCode() *string { +func (s *Err2Error) GetCode() *string { return s.Code } -func (s *Err2) GetStack() *string { +func (s *Err2Error) GetStack() *string { return s.Stack } -func (s *Err2) GetAccessErrMessage() *string { +func (s *Err2Error) GetAccessErrMessage() *string { return s.AccessErrMessage } @@ -1155,6 +1155,14 @@ func (client *Client) TemplateString () (_result *string, _err error) { return _result, _err } +func (client *Client) IntOp (a *int) { + b := dara.IntValue(a) + b++ + ++b + b-- + --b +} + func (client *Client) ThrowsFunc () (_result *string, _err error) { _result = dara.String("/" + dara.StringValue(client.Protocol)) return _result, _err @@ -1335,15 +1343,15 @@ func (client *Client) MultiTryCatch (a *int) (_err error) { _result, _err = multiTryCatch_opTryFunc(a) final := "ok" if _err != nil { - if _t, ok := _err.(*Err1); ok { + if _t, ok := _err.(*Err1Error); ok { err := _t; fmt.Printf("[LOG] %s\n", dara.StringValue(err.Name)) } - if _t, ok := _err.(*Err2); ok { + if _t, ok := _err.(*Err2Error); ok { err := _t; fmt.Printf("[LOG] %s\n", dara.StringValue(err.Name)) } - if _t, ok := _err.(*source.Err3); ok { + if _t, ok := _err.(*source.Err3Error); ok { err := _t; fmt.Printf("[LOG] %s\n", dara.StringValue(err.Name)) } @@ -1409,7 +1417,7 @@ func complex3_opResponse (response_ *dara.Response, request *ComplexRequest, cli func multiTryCatch_opTryFunc (a *int)(_err error) { if dara.IntValue(a) > 0 { - _err = &Err1{ + _err = &Err1Error{ Name: dara.String("str"), Code: dara.String("str"), Data: map[string]*string{ @@ -1418,14 +1426,14 @@ func multiTryCatch_opTryFunc (a *int)(_err error) { } return _err } else if dara.IntValue(a) == 0 { - _err = &Err2{ + _err = &Err2Error{ Name: dara.String("str"), Code: dara.String("str"), AccessErrMessage: dara.String("str2"), } return _err } else if dara.IntValue(a) == -10 { - _err = &source.Err3{ + _err = &source.Err3Error{ Name: dara.String("str"), Code: dara.String("str"), } diff --git a/test/fixtures/complex/main.dara b/test/fixtures/complex/main.dara index 893a364..394698d 100644 --- a/test/fixtures/complex/main.dara +++ b/test/fixtures/complex/main.dara @@ -367,6 +367,14 @@ async function templateString(): string { return `/${@protocol}`; } +function intOp(a: integer): void { + var b = a; + b++; + ++b; + b--; + --b; +} + function throwsFunc() throws: string { return `/${@protocol}`; } diff --git a/test/fixtures/exception/client.go b/test/fixtures/exception/client.go index 36fcfd0..f48f1bf 100644 --- a/test/fixtures/exception/client.go +++ b/test/fixtures/exception/client.go @@ -4,7 +4,7 @@ package client import ( "io" source "github.com/aliyun/darabonba-go-generator/test" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" "fmt" ) @@ -13,7 +13,7 @@ type iM interface { String() string GoString() string SetSubM(v *MSubM) *M - GetSubM() *M + GetSubM() *MSubM } type M struct { @@ -29,7 +29,7 @@ func (s M) GoString() string { return s.String() } -func (s *M) GetSubM() *M { +func (s *M) GetSubM() *MSubM { return s.SubM } @@ -49,13 +49,13 @@ func (s MSubM) GoString() string { return s.String() } -type iMyErr interface { +type iMyErrError interface { dara.BaseError GetStringfield() *string GetStringarrayfield() []*string GetMapfield() map[string]*string GetName() *int - GetSubmodel() *MyErr + GetSubmodel() *MyErrSubmodel GetModuleModelMap() map[string]*source.Request GetSubModelMap() map[string]*MSubM GetModelMap() map[string]*M @@ -73,11 +73,11 @@ type iMyErr interface { GetReadable() io.Reader GetRequest() *dara.Request GetLists() [][]*string - GetArrays() [][]*MyErr + GetArrays() [][]*MyErrArrays GetComplexList() [][]*string } -type MyErr struct { +type MyErrError struct { dara.BaseError Message *string `` Code *string `` @@ -108,120 +108,120 @@ type MyErr struct { ComplexList [][]*string ` require:"true" type:"Repeated"` } -func (err MyErr) Error() string { +func (err MyErrError) Error() string { if err.Message == nil { - str := fmt.Sprintf("MyErr:\n Name: %s\n Code: %s\n", + str := fmt.Sprintf("MyErrError:\n Name: %s\n Code: %s\n", dara.StringValue(err.Name), dara.StringValue(err.Code)) err.Message = dara.String(str) } return dara.StringValue(err.Message) } -func (s *MyErr) GetMessage() *string { +func (s *MyErrError) GetMessage() *string { return s.Message } -func (s *MyErr) GetCode() *string { +func (s *MyErrError) GetCode() *string { return s.Code } -func (s *MyErr) GetStack() *string { +func (s *MyErrError) GetStack() *string { return s.Stack } -func (s *MyErr) GetStringfield() *string { +func (s *MyErrError) GetStringfield() *string { return s.Stringfield } -func (s *MyErr) GetStringarrayfield() []*string { +func (s *MyErrError) GetStringarrayfield() []*string { return s.Stringarrayfield } -func (s *MyErr) GetMapfield() map[string]*string { +func (s *MyErrError) GetMapfield() map[string]*string { return s.Mapfield } -func (s *MyErr) GetName() *int { +func (s *MyErrError) GetName() *int { return s.Name } -func (s *MyErr) GetSubmodel() *MyErr { +func (s *MyErrError) GetSubmodel() *MyErrSubmodel { return s.Submodel } -func (s *MyErr) GetModuleModelMap() map[string]*source.Request { +func (s *MyErrError) GetModuleModelMap() map[string]*source.Request { return s.ModuleModelMap } -func (s *MyErr) GetSubModelMap() map[string]*MSubM { +func (s *MyErrError) GetSubModelMap() map[string]*MSubM { return s.SubModelMap } -func (s *MyErr) GetModelMap() map[string]*M { +func (s *MyErrError) GetModelMap() map[string]*M { return s.ModelMap } -func (s *MyErr) GetModuleMap() map[string]*source.Client { +func (s *MyErrError) GetModuleMap() map[string]*source.Client { return s.ModuleMap } -func (s *MyErr) GetObject() map[string]interface{} { +func (s *MyErrError) GetObject() map[string]interface{} { return s.Object } -func (s *MyErr) GetNumberfield() *int { +func (s *MyErrError) GetNumberfield() *int { return s.Numberfield } -func (s *MyErr) GetInt64field() *int64 { +func (s *MyErrError) GetInt64field() *int64 { return s.Int64field } -func (s *MyErr) GetUint64field() *uint64 { +func (s *MyErrError) GetUint64field() *uint64 { return s.Uint64field } -func (s *MyErr) GetInt32field() *int32 { +func (s *MyErrError) GetInt32field() *int32 { return s.Int32field } -func (s *MyErr) GetUint32field() *uint32 { +func (s *MyErrError) GetUint32field() *uint32 { return s.Uint32field } -func (s *MyErr) GetInt16field() *int16 { +func (s *MyErrError) GetInt16field() *int16 { return s.Int16field } -func (s *MyErr) GetUint16field() *uint16 { +func (s *MyErrError) GetUint16field() *uint16 { return s.Uint16field } -func (s *MyErr) GetInt8field() *int8 { +func (s *MyErrError) GetInt8field() *int8 { return s.Int8field } -func (s *MyErr) GetUint8field() *uint8 { +func (s *MyErrError) GetUint8field() *uint8 { return s.Uint8field } -func (s *MyErr) GetReadable() io.Reader { +func (s *MyErrError) GetReadable() io.Reader { return s.Readable } -func (s *MyErr) GetRequest() *dara.Request { +func (s *MyErrError) GetRequest() *dara.Request { return s.Request } -func (s *MyErr) GetLists() [][]*string { +func (s *MyErrError) GetLists() [][]*string { return s.Lists } -func (s *MyErr) GetArrays() [][]*MyErr { +func (s *MyErrError) GetArrays() [][]*MyErrArrays { return s.Arrays } -func (s *MyErr) GetComplexList() [][]*string { +func (s *MyErrError) GetComplexList() [][]*string { return s.ComplexList } @@ -267,13 +267,13 @@ func (s *MyErrArrays) SetName(v string) *MyErrArrays { return s } -type iSubRespErr interface { +type iSubRespErrError interface { dara.IResponseError GetTestField() *string GetRetryAtfter() *string } -type SubRespErr struct { +type SubRespErrError struct { dara.IResponseError StatusCode *int `` RetryAfter *int `` @@ -285,55 +285,55 @@ type SubRespErr struct { RetryAtfter *string ` require:"true"` } -func (err SubRespErr) Error() string { +func (err SubRespErrError) Error() string { if err.Message == nil { - str := fmt.Sprintf("SubRespErr:\n Name: %s\n Code: %s\n", + str := fmt.Sprintf("SubRespErrError:\n Name: %s\n Code: %s\n", dara.StringValue(err.Name), dara.StringValue(err.Code)) err.Message = dara.String(str) } return dara.StringValue(err.Message) } -func (s *SubRespErr) GetStatusCode() *int { +func (s *SubRespErrError) GetStatusCode() *int { return s.StatusCode } -func (s *SubRespErr) GetRetryAfter() *int { +func (s *SubRespErrError) GetRetryAfter() *int { return s.RetryAfter } -func (s *SubRespErr) GetName() *string { +func (s *SubRespErrError) GetName() *string { return s.Name } -func (s *SubRespErr) GetMessage() *string { +func (s *SubRespErrError) GetMessage() *string { return s.Message } -func (s *SubRespErr) GetCode() *string { +func (s *SubRespErrError) GetCode() *string { return s.Code } -func (s *SubRespErr) GetStack() *string { +func (s *SubRespErrError) GetStack() *string { return s.Stack } -func (s *SubRespErr) GetTestField() *string { +func (s *SubRespErrError) GetTestField() *string { return s.TestField } -func (s *SubRespErr) GetRetryAtfter() *string { +func (s *SubRespErrError) GetRetryAtfter() *string { return s.RetryAtfter } -type iSubMyErr interface { - iMyErr +type iSubMyErrError interface { + iMyErrError GetTestField() *string GetRetryAtfter() *string } -type SubMyErr struct { - iMyErr +type SubMyErrError struct { + iMyErrError Stringfield *string ` require:"true"` Stringarrayfield []*string ` require:"true" type:"Repeated"` Mapfield map[string]*string ` require:"true"` @@ -362,116 +362,116 @@ type SubMyErr struct { RetryAtfter *string ` require:"true"` } -func (err SubMyErr) Error() string { +func (err SubMyErrError) Error() string { if err.Message == nil { - str := fmt.Sprintf("SubMyErr:\n Name: %s\n Code: %s\n", + str := fmt.Sprintf("SubMyErrError:\n Name: %s\n Code: %s\n", dara.StringValue(err.Name), dara.StringValue(err.Code)) err.Message = dara.String(str) } return dara.StringValue(err.Message) } -func (s *SubMyErr) GetStringfield() *string { +func (s *SubMyErrError) GetStringfield() *string { return s.Stringfield } -func (s *SubMyErr) GetStringarrayfield() []*string { +func (s *SubMyErrError) GetStringarrayfield() []*string { return s.Stringarrayfield } -func (s *SubMyErr) GetMapfield() map[string]*string { +func (s *SubMyErrError) GetMapfield() map[string]*string { return s.Mapfield } -func (s *SubMyErr) GetName() *int { +func (s *SubMyErrError) GetName() *int { return s.Name } -func (s *SubMyErr) GetSubmodel() *SubMyErr { +func (s *SubMyErrError) GetSubmodel() *SubMyErrSubmodel { return s.Submodel } -func (s *SubMyErr) GetModuleModelMap() map[string]*source.Request { +func (s *SubMyErrError) GetModuleModelMap() map[string]*source.Request { return s.ModuleModelMap } -func (s *SubMyErr) GetSubModelMap() map[string]*MSubM { +func (s *SubMyErrError) GetSubModelMap() map[string]*MSubM { return s.SubModelMap } -func (s *SubMyErr) GetModelMap() map[string]*M { +func (s *SubMyErrError) GetModelMap() map[string]*M { return s.ModelMap } -func (s *SubMyErr) GetModuleMap() map[string]*source.Client { +func (s *SubMyErrError) GetModuleMap() map[string]*source.Client { return s.ModuleMap } -func (s *SubMyErr) GetObject() map[string]interface{} { +func (s *SubMyErrError) GetObject() map[string]interface{} { return s.Object } -func (s *SubMyErr) GetNumberfield() *int { +func (s *SubMyErrError) GetNumberfield() *int { return s.Numberfield } -func (s *SubMyErr) GetInt64field() *int64 { +func (s *SubMyErrError) GetInt64field() *int64 { return s.Int64field } -func (s *SubMyErr) GetUint64field() *uint64 { +func (s *SubMyErrError) GetUint64field() *uint64 { return s.Uint64field } -func (s *SubMyErr) GetInt32field() *int32 { +func (s *SubMyErrError) GetInt32field() *int32 { return s.Int32field } -func (s *SubMyErr) GetUint32field() *uint32 { +func (s *SubMyErrError) GetUint32field() *uint32 { return s.Uint32field } -func (s *SubMyErr) GetInt16field() *int16 { +func (s *SubMyErrError) GetInt16field() *int16 { return s.Int16field } -func (s *SubMyErr) GetUint16field() *uint16 { +func (s *SubMyErrError) GetUint16field() *uint16 { return s.Uint16field } -func (s *SubMyErr) GetInt8field() *int8 { +func (s *SubMyErrError) GetInt8field() *int8 { return s.Int8field } -func (s *SubMyErr) GetUint8field() *uint8 { +func (s *SubMyErrError) GetUint8field() *uint8 { return s.Uint8field } -func (s *SubMyErr) GetReadable() io.Reader { +func (s *SubMyErrError) GetReadable() io.Reader { return s.Readable } -func (s *SubMyErr) GetRequest() *dara.Request { +func (s *SubMyErrError) GetRequest() *dara.Request { return s.Request } -func (s *SubMyErr) GetLists() [][]*string { +func (s *SubMyErrError) GetLists() [][]*string { return s.Lists } -func (s *SubMyErr) GetArrays() [][]*SubMyErr { +func (s *SubMyErrError) GetArrays() [][]*SubMyErrArrays { return s.Arrays } -func (s *SubMyErr) GetComplexList() [][]*string { +func (s *SubMyErrError) GetComplexList() [][]*string { return s.ComplexList } -func (s *SubMyErr) GetTestField() *string { +func (s *SubMyErrError) GetTestField() *string { return s.TestField } -func (s *SubMyErr) GetRetryAtfter() *string { +func (s *SubMyErrError) GetRetryAtfter() *string { return s.RetryAtfter } diff --git a/test/fixtures/extends/client.go b/test/fixtures/extends/client.go index bd55e85..b989b45 100644 --- a/test/fixtures/extends/client.go +++ b/test/fixtures/extends/client.go @@ -3,7 +3,7 @@ package client import ( source "github.com/aliyun/darabonba-go-generator/test" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/extendsWithoutInit/client.go b/test/fixtures/extendsWithoutInit/client.go index 8a6ac9a..b5dc2fc 100644 --- a/test/fixtures/extendsWithoutInit/client.go +++ b/test/fixtures/extendsWithoutInit/client.go @@ -3,7 +3,7 @@ package client import ( source "github.com/aliyun/darabonba-go-generator/test" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/function/client.go b/test/fixtures/function/client.go index a6aaccb..3d75bc2 100644 --- a/test/fixtures/function/client.go +++ b/test/fixtures/function/client.go @@ -2,7 +2,7 @@ package client import ( - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/import/client.go b/test/fixtures/import/client.go index 9e2c07c..4909cce 100644 --- a/test/fixtures/import/client.go +++ b/test/fixtures/import/client.go @@ -5,7 +5,7 @@ import ( string_ "github.com/aliyun/darabonba-go-generator/test" map_ "github.com/aliyun/darabonba-go-generator/test" localsource "github.com/aliyun/darabonba-go-generator" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/interface/client.go b/test/fixtures/interface/client.go index 65eeb64..153e1cc 100644 --- a/test/fixtures/interface/client.go +++ b/test/fixtures/interface/client.go @@ -5,7 +5,7 @@ import ( spi "github.com/alibabacloud-go/alibabacloud-gateway-spi/client" gatewayclient "github.com/alibabacloud-go/alibabacloud-gateway-sls/client" openapi "github.com/alibabacloud-go/darabonba-openapi/client" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/interface/spi.go b/test/fixtures/interface/spi.go index 9559d4d..42fc265 100644 --- a/test/fixtures/interface/spi.go +++ b/test/fixtures/interface/spi.go @@ -4,7 +4,7 @@ package client import ( "io" credential "github.com/aliyun/credentials-go/credentials" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) @@ -13,11 +13,11 @@ type iInterceptorContext interface { String() string GoString() string SetRequest(v *InterceptorContextRequest) *InterceptorContext - GetRequest() *InterceptorContext + GetRequest() *InterceptorContextRequest SetConfiguration(v *InterceptorContextConfiguration) *InterceptorContext - GetConfiguration() *InterceptorContext + GetConfiguration() *InterceptorContextConfiguration SetResponse(v *InterceptorContextResponse) *InterceptorContext - GetResponse() *InterceptorContext + GetResponse() *InterceptorContextResponse } type InterceptorContext struct { @@ -35,15 +35,15 @@ func (s InterceptorContext) GoString() string { return s.String() } -func (s *InterceptorContext) GetRequest() *InterceptorContext { +func (s *InterceptorContext) GetRequest() *InterceptorContextRequest { return s.Request } -func (s *InterceptorContext) GetConfiguration() *InterceptorContext { +func (s *InterceptorContext) GetConfiguration() *InterceptorContextConfiguration { return s.Configuration } -func (s *InterceptorContext) GetResponse() *InterceptorContext { +func (s *InterceptorContext) GetResponse() *InterceptorContextResponse { return s.Response } diff --git a/test/fixtures/main/main.go b/test/fixtures/main/main.go index fdf30e6..6ce7138 100644 --- a/test/fixtures/main/main.go +++ b/test/fixtures/main/main.go @@ -3,7 +3,7 @@ package main import ( "os" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/model/client.go b/test/fixtures/model/client.go index ac9498d..c3cbfe2 100644 --- a/test/fixtures/model/client.go +++ b/test/fixtures/model/client.go @@ -4,7 +4,7 @@ package client import ( "io" source "github.com/aliyun/darabonba-go-generator/test" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) @@ -13,7 +13,7 @@ type iM interface { String() string GoString() string SetSubM(v *MSubM) *M - GetSubM() *M + GetSubM() *MSubM } type M struct { @@ -29,7 +29,7 @@ func (s M) GoString() string { return s.String() } -func (s *M) GetSubM() *M { +func (s *M) GetSubM() *MSubM { return s.SubM } @@ -62,7 +62,7 @@ type iMyModel interface { SetName(v string) *MyModel GetName() *string SetSubmodel(v *MyModelSubmodel) *MyModel - GetSubmodel() *MyModel + GetSubmodel() *MyModelSubmodel SetModuleModelMap(v map[string]*source.Request) *MyModel GetModuleModelMap() map[string]*source.Request SetSubModelMap(v map[string]*MSubM) *MyModel @@ -98,7 +98,7 @@ type iMyModel interface { SetLists(v [][]*string) *MyModel GetLists() [][]*string SetArrays(v [][]*MyModelArrays) *MyModel - GetArrays() [][]*MyModel + GetArrays() [][]*MyModelArrays SetComplexList(v [][]*string) *MyModel GetComplexList() [][]*string } @@ -155,7 +155,7 @@ func (s *MyModel) GetName() *string { return s.Name } -func (s *MyModel) GetSubmodel() *MyModel { +func (s *MyModel) GetSubmodel() *MyModelSubmodel { return s.Submodel } @@ -227,7 +227,7 @@ func (s *MyModel) GetLists() [][]*string { return s.Lists } -func (s *MyModel) GetArrays() [][]*MyModel { +func (s *MyModel) GetArrays() [][]*MyModelArrays { return s.Arrays } diff --git a/test/fixtures/model/client_no_omit.go b/test/fixtures/model/client_no_omit.go index 7a3a12f..e72a349 100644 --- a/test/fixtures/model/client_no_omit.go +++ b/test/fixtures/model/client_no_omit.go @@ -4,7 +4,7 @@ package client import ( "io" source "github.com/aliyun/darabonba-go-generator/test" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) @@ -13,7 +13,7 @@ type iM interface { String() string GoString() string SetSubM(v *MSubM) *M - GetSubM() *M + GetSubM() *MSubM } type M struct { @@ -29,7 +29,7 @@ func (s M) GoString() string { return s.String() } -func (s *M) GetSubM() *M { +func (s *M) GetSubM() *MSubM { return s.SubM } @@ -62,7 +62,7 @@ type iMyModel interface { SetName(v string) *MyModel GetName() *string SetSubmodel(v *MyModelSubmodel) *MyModel - GetSubmodel() *MyModel + GetSubmodel() *MyModelSubmodel SetModuleModelMap(v map[string]*source.Request) *MyModel GetModuleModelMap() map[string]*source.Request SetSubModelMap(v map[string]*MSubM) *MyModel @@ -98,7 +98,7 @@ type iMyModel interface { SetLists(v [][]*string) *MyModel GetLists() [][]*string SetArrays(v [][]*MyModelArrays) *MyModel - GetArrays() [][]*MyModel + GetArrays() [][]*MyModelArrays SetComplexList(v [][]*string) *MyModel GetComplexList() [][]*string } @@ -155,7 +155,7 @@ func (s *MyModel) GetName() *string { return s.Name } -func (s *MyModel) GetSubmodel() *MyModel { +func (s *MyModel) GetSubmodel() *MyModelSubmodel { return s.Submodel } @@ -227,7 +227,7 @@ func (s *MyModel) GetLists() [][]*string { return s.Lists } -func (s *MyModel) GetArrays() [][]*MyModel { +func (s *MyModel) GetArrays() [][]*MyModelArrays { return s.Arrays } diff --git a/test/fixtures/multi/sdk/api.go b/test/fixtures/multi/sdk/api.go index 5165e7c..cde5498 100644 --- a/test/fixtures/multi/sdk/api.go +++ b/test/fixtures/multi/sdk/api.go @@ -4,7 +4,7 @@ package api import ( user "darabonba.com/multi/model/user" util "darabonba.com/multi/lib/util" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/multi/sdk/client.go b/test/fixtures/multi/sdk/client.go index dc35c0f..3c807d0 100644 --- a/test/fixtures/multi/sdk/client.go +++ b/test/fixtures/multi/sdk/client.go @@ -5,7 +5,7 @@ import ( user "darabonba.com/multi/model/user" util "darabonba.com/multi/lib/util" api "darabonba.com/multi/api" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/multi/sdk/user.go b/test/fixtures/multi/sdk/user.go index 2cebfc7..677da2a 100644 --- a/test/fixtures/multi/sdk/user.go +++ b/test/fixtures/multi/sdk/user.go @@ -4,7 +4,7 @@ package user import ( darautil "github.com/alibabacloud-go/tea-utils/v2/service" util "darabonba.com/multi/lib/util" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/multi/sdk/util.go b/test/fixtures/multi/sdk/util.go index 4a9d743..c226544 100644 --- a/test/fixtures/multi/sdk/util.go +++ b/test/fixtures/multi/sdk/util.go @@ -2,7 +2,7 @@ package util import ( - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/statements/client.go b/test/fixtures/statements/client.go index f0606a5..80bd917 100644 --- a/test/fixtures/statements/client.go +++ b/test/fixtures/statements/client.go @@ -2,7 +2,7 @@ package client import ( - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/tea/client.go b/test/fixtures/tea/client.go index d6331b2..f08341b 100644 --- a/test/fixtures/tea/client.go +++ b/test/fixtures/tea/client.go @@ -4,7 +4,7 @@ package client import ( source "github.com/aliyun/darabonba-go-generator" localsource "github.com/aliyun/darabonba-go-generator" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/try/client.go b/test/fixtures/try/client.go index 95b5460..9a86624 100644 --- a/test/fixtures/try/client.go +++ b/test/fixtures/try/client.go @@ -3,16 +3,16 @@ package client import ( source "github.com/aliyun/darabonba-go-generator/test" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" "fmt" ) -type iErr1 interface { +type iErr1Error interface { dara.BaseError GetData() map[string]*string } -type Err1 struct { +type Err1Error struct { dara.BaseError Name *string `` Message *string `` @@ -21,41 +21,41 @@ type Err1 struct { Data map[string]*string ` require:"true"` } -func (err Err1) Error() string { +func (err Err1Error) Error() string { if err.Message == nil { - str := fmt.Sprintf("Err1:\n Name: %s\n Code: %s\n", + str := fmt.Sprintf("Err1Error:\n Name: %s\n Code: %s\n", dara.StringValue(err.Name), dara.StringValue(err.Code)) err.Message = dara.String(str) } return dara.StringValue(err.Message) } -func (s *Err1) GetName() *string { +func (s *Err1Error) GetName() *string { return s.Name } -func (s *Err1) GetMessage() *string { +func (s *Err1Error) GetMessage() *string { return s.Message } -func (s *Err1) GetCode() *string { +func (s *Err1Error) GetCode() *string { return s.Code } -func (s *Err1) GetStack() *string { +func (s *Err1Error) GetStack() *string { return s.Stack } -func (s *Err1) GetData() map[string]*string { +func (s *Err1Error) GetData() map[string]*string { return s.Data } -type iErr2 interface { +type iErr2Error interface { dara.BaseError GetAccessErrMessage() *string } -type Err2 struct { +type Err2Error struct { dara.BaseError Name *string `` Message *string `` @@ -64,32 +64,32 @@ type Err2 struct { AccessErrMessage *string ` require:"true"` } -func (err Err2) Error() string { +func (err Err2Error) Error() string { if err.Message == nil { - str := fmt.Sprintf("Err2:\n Name: %s\n Code: %s\n", + str := fmt.Sprintf("Err2Error:\n Name: %s\n Code: %s\n", dara.StringValue(err.Name), dara.StringValue(err.Code)) err.Message = dara.String(str) } return dara.StringValue(err.Message) } -func (s *Err2) GetName() *string { +func (s *Err2Error) GetName() *string { return s.Name } -func (s *Err2) GetMessage() *string { +func (s *Err2Error) GetMessage() *string { return s.Message } -func (s *Err2) GetCode() *string { +func (s *Err2Error) GetCode() *string { return s.Code } -func (s *Err2) GetStack() *string { +func (s *Err2Error) GetStack() *string { return s.Stack } -func (s *Err2) GetAccessErrMessage() *string { +func (s *Err2Error) GetAccessErrMessage() *string { return s.AccessErrMessage } @@ -119,19 +119,19 @@ func (client *Client) TryMultiCatch (a *int) (_result *int, _err error) { _result, _err = tryMultiCatch_opTryFunc(a) final := "ok" if _err != nil { - if _t, ok := _err.(*Err1); ok { + if _t, ok := _err.(*Err1Error); ok { err := _t; fmt.Printf("[LOG] %s\n", dara.StringValue(err.Name)) _result = nil return _result , _err } - if _t, ok := _err.(*Err2); ok { + if _t, ok := _err.(*Err2Error); ok { err := _t; fmt.Printf("[LOG] %s\n", dara.StringValue(err.Name)) _result = nil return _result , _err } - if _t, ok := _err.(*source.Err3); ok { + if _t, ok := _err.(*source.Err3Error); ok { err := _t; fmt.Printf("[LOG] %s\n", dara.StringValue(err.Name)) _result = nil @@ -154,14 +154,14 @@ func (client *Client) MultiTryCatch (a *int) (_result map[string]*string, _err e "key1": dara.String("str"), } if dara.IntValue(a) > 0 { - _err = &Err1{ + _err = &Err1Error{ Name: dara.String(name), Code: dara.String(code), Data: data, } _result = data if _err != nil { - if _t, ok := _err.(*Err1); ok { + if _t, ok := _err.(*Err1Error); ok { err := _t; name = "str1" code = "str1" @@ -175,14 +175,14 @@ func (client *Client) MultiTryCatch (a *int) (_result map[string]*string, _err e accessErrMessage := "str2" if dara.IntValue(a) == 0 { - _err = &Err2{ + _err = &Err2Error{ Name: dara.String(name), Code: dara.String(code), AccessErrMessage: dara.String(accessErrMessage), } _result = data if _err != nil { - if _t, ok := _err.(*Err2); ok { + if _t, ok := _err.(*Err2Error); ok { err := _t; name = "str2" code = "str2" @@ -198,7 +198,7 @@ func (client *Client) MultiTryCatch (a *int) (_result map[string]*string, _err e final := "ok" _result = data if _err != nil { - if _t, ok := _err.(*source.Err3); ok { + if _t, ok := _err.(*source.Err3Error); ok { err := _t; fmt.Printf("[LOG] %s\n", dara.StringValue(err.Name)) } @@ -213,7 +213,7 @@ func (client *Client) MultiTryCatch (a *int) (_result map[string]*string, _err e func tryMultiCatch_opTryFunc (a *int)( _result *int, _err error) { if dara.IntValue(a) > 0 { a = dara.Int(20) - _err = &Err1{ + _err = &Err1Error{ Name: dara.String("str"), Code: dara.String("str"), Data: map[string]*string{ @@ -222,14 +222,14 @@ func tryMultiCatch_opTryFunc (a *int)( _result *int, _err error) { } return _result, _err } else if dara.IntValue(a) == 0 { - _err = &Err2{ + _err = &Err2Error{ Name: dara.String("str"), Code: dara.String("str"), AccessErrMessage: dara.String("str2"), } return _result, _err } else if dara.IntValue(a) == -10 { - _err = &source.Err3{ + _err = &source.Err3Error{ Name: dara.String("str"), Code: dara.String("str"), } @@ -248,7 +248,7 @@ func tryMultiCatch_opTryFunc (a *int)( _result *int, _err error) { func multiTryCatch_opTryFunc (a *int, name string, code string, data map[string]*string)(_err error) { if dara.IntValue(a) == -10 { - _err = &source.Err3{ + _err = &source.Err3Error{ Name: dara.String(name), Code: dara.String(code), AccessErrMessage: data["key1"], diff --git a/test/fixtures/typedef/client.go b/test/fixtures/typedef/client.go index 31ac972..c9ec1a0 100644 --- a/test/fixtures/typedef/client.go +++ b/test/fixtures/typedef/client.go @@ -5,7 +5,7 @@ import ( "net/http" "net/url" oss "github.com/aliyun/darabonba-go-generator" - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" ) diff --git a/test/fixtures/yield/client.go b/test/fixtures/yield/client.go index 3d0c27d..de834b7 100644 --- a/test/fixtures/yield/client.go +++ b/test/fixtures/yield/client.go @@ -2,7 +2,7 @@ package client import ( - dara "github.com/alibabacloud-go/tea/tea" + "github.com/alibabacloud-go/tea/dara" )