Esempio n. 1
0
func GetFacts(cfg config.Config) *facts.Facts {
	c = cfg
	f := facts.New()
	if c.Path == "" || (c.Path != "" && strings.Contains(c.Path, "System")) {
		systemFacts := getSystemFacts()
		f.Add("System", systemFacts)
	}
	facts.ProcessExternalFacts(c, f)
	return f
}
Esempio n. 2
0
func getFacts(c config.Config) *facts.Facts {
	f := facts.New()
	switch goos := runtime.GOOS; goos {
	case "linux":
		f = linux.GetFacts(c)
	default:
		errorAndExit(fmt.Errorf("OS %s is not supported.\n", goos))
	}
	return f
}