mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
docker.go shortName() use TrimPrefix()
This commit is contained in:
parent
b4a63f8c60
commit
6c662d91fb
@ -290,5 +290,5 @@ func (cm *Docker) All() (containers container.Containers) {
|
||||
|
||||
// use primary container name
|
||||
func shortName(name string) string {
|
||||
return strings.Replace(name, "/", "", 1)
|
||||
return strings.TrimPrefix(name, "/")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user