From 0cddf41882ea0f2896097db76dde69faadde8902 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Thu, 26 Sep 2024 14:46:03 +0200 Subject: [PATCH] Fix sdk imports --- src/lib/code-sample/go.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/code-sample/go.ts b/src/lib/code-sample/go.ts index bc81ed9..705fb76 100644 --- a/src/lib/code-sample/go.ts +++ b/src/lib/code-sample/go.ts @@ -39,8 +39,7 @@ export const createGoRequest = ( const goSdkImports = generateImports({ goPackageName, goPackageBasePath, - shouldIncludeDefaultImport: - isReqWithParams || goPackageName === GO_PACKAGE_CONFIG.defaultPackageName, + shouldIncludeDefaultImport: isReqWithParams, }) const requestStructName = getRequestStructName(request.path) @@ -52,7 +51,7 @@ export const createGoRequest = ( return `${goSdkImports} client${parts.map((p) => pascalCase(p)).join('.')}(${goSdkRequestArgs}) - ` + `.trim() } const getGoPackageName = (path: string): string => {