mirror of https://github.com/bcicen/ctop.git
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