func LoadServerConfigOrPass(configPath string) error {
	var err error

	// Try custom path first
	if configPath != "" {
		return readConfigPath(configPath, "from commandline", Server.LoadConfig, &LoadedServerConfigPath)
	}

	configPath = os.Getenv("BITMAELUM_SERVER_CONFIG")
	if configPath != "" {
		return readConfigPath(configPath, "from BITMAELUM_SERVER_CONFIG environment", Server.LoadConfig, &LoadedServerConfigPath)
	}

	// try on our search paths
	for _, p := range getSearchPaths() {
		p = filepath.Join(p, ServerConfigFile)
		err = readConfigPath(p, "from hardcoded search path", Server.LoadConfig, &LoadedServerConfigPath)

		// Set config path if this is the one found
		if err == nil {
			LoadedServerConfigPath = p
		}
		if err == nil || err != errConfigNotFound {
			return err
		}
	}

	return errServerConfigNotFound
}
// LoadServerConfigOrPass loads client configuration, but return false if not able
LoadServerConfigOrPass loads client configuration, but return false if not able
// LoadServerConfigOrPass loads client configuration but return false if not able
func LoadServerConfigOrPass(configPath string) error {
	var err error
	if configPath != "" {
		return readConfigPath(configPath, "from commandline", Server.LoadConfig, &LoadedServerConfigPath)
	}
	configPath = os.Getenv("BITMAELUM_SERVER_CONFIG")
	if configPath != "" {
		return readConfigPath(configPath, "from BITMAELUM_SERVER_CONFIG environment", Server.LoadConfig, &LoadedServerConfigPath)
	}
	for _, p := range getSearchPaths() {
		p = filepath.Join(p, ServerConfigFile)
		err = readConfigPath(p, "from hardcoded search path", Server.LoadConfig, &LoadedServerConfigPath)
		if err == nil {
			LoadedServerConfigPath = p
		}
		if err == nil || err != errConfigNotFound {
			return err
		}
	}
	return errServerConfigNotFound
}
func LoadServerConfigOrPass ( configPath string ) error { var err error if configPath != " " { return readConfigPath ( configPath , " " , Server . LoadConfig , & LoadedServerConfigPath ) } configPath = os . Getenv ( " " ) if configPath != " " { return readConfigPath ( configPath , " " , Server . LoadConfig , & LoadedServerConfigPath ) } for _ , p := range getSearchPaths ( ) { p = filepath . Join ( p , ServerConfigFile ) err = readConfigPath ( p , " " , Server . LoadConfig , & LoadedServerConfigPath ) if err == nil { LoadedServerConfigPath = p } if err == nil || err != errConfigNotFound { return err } } return errServerConfigNotFound }
LoadServerConfigOrPass loads client configuration, but return false if not able
LoadServerConfigOrPass loads client configuration but return false if not able
// Try custom path first // try on our search paths // Set config path if this is the one found