mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-09-05 23:20:04 +00:00
Show the root namespace "library" in the dropdown even when there are no repos in it
This commit is contained in:
@@ -42,3 +42,13 @@ func PrettySize(size float64) string {
|
||||
}
|
||||
return fmt.Sprintf("%.*f %s", 0, size, units[i])
|
||||
}
|
||||
|
||||
// ItemInSlice check if item is an element of slice
|
||||
func ItemInSlice(item string, slice []string) bool {
|
||||
for _, i := range slice {
|
||||
if i == item {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user