func (c *Config) LoadRemote(format, url string) (err error) {
	client := http.Client{Timeout: 300 * time.Second}
	resp, err := client.Get(url)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	if resp.StatusCode != 200 {
		return fmt.Errorf("fetch remote resource error, reply status code is not equals to 200")
	}
	bts, err := io.ReadAll(resp.Body)
	if err == nil {
		if err = c.parseSourceCode(format, bts); err != nil {
			return
		}
		c.loadedFiles = append(c.loadedFiles, url)
	}
	return
}
LoadRemote load config data from remote URL.
Usage:
c.LoadRemote(config.JSON, "http://abc.com/api-config.json")
package config
import (
	"flag"
	"fmt"
	"io"
	"net/http"
	"os"
	"path/filepath"
	"strings"
	"time"
	"github.com/imdario/mergo"
	"github.com/pkg/errors"
)
func LoadDir(dir, suffix string) error { return dc.LoadDir(dir, suffix) }
func (c *Config) LoadDir(dir, suffix string) (err error) {
	fileList := []string{}
	err = filepath.Walk(dir, func(path string, f os.FileInfo, err error) error {
		ok := strings.HasSuffix(f.Name(), suffix)
		if ok {
			fileList = append(fileList, filepath.FromSlash(path))
		}
		return nil
	})
	if err != nil {
		return
	}
	for _, file := range fileList {
		if err = c.loadFile(file, false, ""); err != nil {
			return
		}
	}
	return
}
func LoadFiles(sourceFiles ...string) error { return dc.LoadFiles(sourceFiles...) }
func (c *Config) LoadFiles(sourceFiles ...string) (err error) {
	for _, file := range sourceFiles {
		if err = c.loadFile(file, false, ""); err != nil {
			return
		}
	}
	return
}
func LoadExists(sourceFiles ...string) error { return dc.LoadExists(sourceFiles...) }
func (c *Config) LoadExists(sourceFiles ...string) (err error) {
	for _, file := range sourceFiles {
		if err = c.loadFile(file, true, ""); err != nil {
			return
		}
	}
	return
}
func LoadRemote(format, url string) error { return dc.LoadRemote(format, url) }