mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
24 lines
329 B
Go
24 lines
329 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
type Config struct {
|
|
dockerHost string
|
|
sortField string
|
|
}
|
|
|
|
var DefaultConfig = NewDefaultConfig()
|
|
|
|
func NewDefaultConfig() Config {
|
|
docker := os.Getenv("DOCKER_HOST")
|
|
if docker == "" {
|
|
docker = "unix:///var/run/docker.sock"
|
|
}
|
|
return Config{
|
|
dockerHost: docker,
|
|
sortField: "id",
|
|
}
|
|
}
|