mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 23:26:45 +08:00
initial refactor of all column widgets to standard interface
This commit is contained in:
@@ -55,11 +55,13 @@ func (e *Single) Down() {
|
||||
}
|
||||
|
||||
func (e *Single) SetWidth(w int) { e.Width = w }
|
||||
func (e *Single) SetMeta(k, v string) {
|
||||
if k == "[ENV-VAR]" {
|
||||
e.Env.Set(k, v)
|
||||
} else {
|
||||
e.Info.Set(k, v)
|
||||
func (e *Single) SetMeta(m models.Meta) {
|
||||
for k, v := range m {
|
||||
if k == "[ENV-VAR]" {
|
||||
e.Env.Set(k, v)
|
||||
} else {
|
||||
e.Info.Set(k, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user