mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
Single Container View: truncate ID
Truncation Id inside of NewSingle() doesn't work. It even doesn't have any effect. Instead truncate the ID inside of NewMeta() call
This commit is contained in:
@@ -23,12 +23,9 @@ type Single struct {
|
||||
Width int
|
||||
}
|
||||
|
||||
func NewSingle(id string) *Single {
|
||||
if len(id) > 12 {
|
||||
id = id[:12]
|
||||
}
|
||||
func NewSingle() *Single {
|
||||
return &Single{
|
||||
Info: NewInfo(id),
|
||||
Info: NewInfo(),
|
||||
Net: NewNet(),
|
||||
Cpu: NewCpu(),
|
||||
Mem: NewMem(),
|
||||
|
||||
Reference in New Issue
Block a user