func LoadBridgeConfigOrPass(configPath string) error {
	var err error

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

	configPath = os.Getenv("BITMAELUM_BRIDGE_CONFIG")
	if configPath != "" {
		return readConfigPath(configPath, "from BITMAELUM_BRIDGE_CONFIG environment", Bridge.LoadConfig, &LoadedBridgeConfigPath)
	}

	// try on our search paths
	for _, p := range getSearchPaths() {
		p = filepath.Join(p, BridgeConfigFile)
		err = readConfigPath(p, "from hardcoded search path", Bridge.LoadConfig, &LoadedBridgeConfigPath)
		if err == nil || err != errConfigNotFound {
			return err
		}
	}

	return errBridgeConfigNotFound
}
// LoadBridgeConfigOrPass loads bridge configuration, but return false if not able
LoadBridgeConfigOrPass loads bridge configuration, but return false if not able
// LoadBridgeConfigOrPass loads bridge configuration but return false if not able
func LoadBridgeConfigOrPass(configPath string) error {
	var err error
	if configPath != "" {
		return readConfigPath(configPath, "from commandline", Bridge.LoadConfig, &LoadedBridgeConfigPath)
	}
	configPath = os.Getenv("BITMAELUM_BRIDGE_CONFIG")
	if configPath != "" {
		return readConfigPath(configPath, "from BITMAELUM_BRIDGE_CONFIG environment", Bridge.LoadConfig, &LoadedBridgeConfigPath)
	}
	for _, p := range getSearchPaths() {
		p = filepath.Join(p, BridgeConfigFile)
		err = readConfigPath(p, "from hardcoded search path", Bridge.LoadConfig, &LoadedBridgeConfigPath)
		if err == nil || err != errConfigNotFound {
			return err
		}
	}
	return errBridgeConfigNotFound
}
func LoadBridgeConfigOrPass ( configPath string ) error { var err error if configPath != " " { return readConfigPath ( configPath , " " , Bridge . LoadConfig , & LoadedBridgeConfigPath ) } configPath = os . Getenv ( " " ) if configPath != " " { return readConfigPath ( configPath , " " , Bridge . LoadConfig , & LoadedBridgeConfigPath ) } for _ , p := range getSearchPaths ( ) { p = filepath . Join ( p , BridgeConfigFile ) err = readConfigPath ( p , " " , Bridge . LoadConfig , & LoadedBridgeConfigPath ) if err == nil || err != errConfigNotFound { return err } } return errBridgeConfigNotFound }
LoadBridgeConfigOrPass loads bridge configuration, but return false if not able
LoadBridgeConfigOrPass loads bridge configuration but return false if not able
// Try custom path first // try on our search paths