Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/docker/cli
/ nilToEmptySlice
Function
nilToEmptySlice
cli/command/image/list_test.go:201–206 ·
view source on GitHub ↗
(s []T)
Source
from the content-addressed store, hash-verified
199
}
200
201
func
nilToEmptySlice[T any](s []T) []T {
202
if
s == nil {
203
return
[]T{}
204
}
205
return
s
206
}
Callers
4
TestNewImagesCommandErrors
Function · 0.85
TestNewImagesCommandSuccess
Function · 0.85
TestNewRemoveCommandErrors
Function · 0.85
TestNewRemoveCommandSuccess
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…