Skip to content

Commit 03231f2

Browse files
yyqqingwwwdata
andauthored
Update marshal.go (#339)
go-staticcheck : should omit nil check; len() for nil slices is defined as zero (S1009) Co-authored-by: Ben Bieker <[email protected]>
1 parent 49a12ed commit 03231f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsonapi/marshal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func marshalSlice(data interface{}, information ServerInformation) (*Document, e
199199
DataArray: dataElements,
200200
}
201201

202-
if includedElements != nil && len(includedElements) > 0 {
202+
if len(includedElements) > 0 {
203203
result.Included = includedElements
204204
}
205205

0 commit comments

Comments
 (0)