ctop/config.go
2017-01-04 12:50:49 -05:00

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",
}
}