mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
34 lines
544 B
Go
34 lines
544 B
Go
|
package config
|
||
|
|
||
|
var params = []*Param{
|
||
|
&Param{
|
||
|
key: "dockerHost",
|
||
|
val: getEnv("DOCKER_HOST", "unix:///var/run/docker.sock"),
|
||
|
label: "Docker API URL",
|
||
|
},
|
||
|
&Param{
|
||
|
key: "filterStr",
|
||
|
val: "",
|
||
|
label: "Container Name or ID Filter",
|
||
|
},
|
||
|
&Param{
|
||
|
key: "sortField",
|
||
|
val: "id",
|
||
|
label: "Container Sort Field",
|
||
|
},
|
||
|
}
|
||
|
|
||
|
type Param struct {
|
||
|
key string
|
||
|
val string
|
||
|
label string
|
||
|
}
|
||
|
|
||
|
// Return param value
|
||
|
func Get(k string) string {
|
||
|
if _, ok := Global.params[k]; ok == true {
|
||
|
return Global.params[k].val
|
||
|
}
|
||
|
return ""
|
||
|
}
|