Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-balitskyi committed Sep 26, 2024
1 parent 3384d75 commit 9a1ed46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/code-sample/go.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ const formatGoValue = ({

const formatGoArray = (value: Json[], key: string): string => {
if (value.length === 0) {
// in Go there's no way define an empty array without specifying type
// and code samples definitions don't include the type annotations
return 'nil'
}

Expand Down

0 comments on commit 9a1ed46

Please sign in to comment.