Skip to content

Commit

Permalink
Fix sdk imports
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-balitskyi committed Sep 26, 2024
1 parent 6025cb5 commit 0cddf41
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/code-sample/go.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -52,7 +51,7 @@ export const createGoRequest = (
return `${goSdkImports}
client${parts.map((p) => pascalCase(p)).join('.')}(${goSdkRequestArgs})
`
`.trim()
}

const getGoPackageName = (path: string): string => {
Expand Down

0 comments on commit 0cddf41

Please sign in to comment.