mirror of https://github.com/v2ray/v2ray-core
add comment to please codacy
parent
a36631357c
commit
f578f0d617
|
@ -13,6 +13,8 @@ var (
|
||||||
EffectiveExtConfigLoader extconfigLoader
|
EffectiveExtConfigLoader extconfigLoader
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// LoadConfig reads from a path/url/stdin
|
||||||
|
// actual work is in external module
|
||||||
func LoadConfig(file string) (io.Reader, error) {
|
func LoadConfig(file string) (io.Reader, error) {
|
||||||
if EffectiveConfigFileLoader == nil {
|
if EffectiveConfigFileLoader == nil {
|
||||||
newError("external config module not loaded, reading from stdin").AtInfo().WriteToLog()
|
newError("external config module not loaded, reading from stdin").AtInfo().WriteToLog()
|
||||||
|
@ -21,6 +23,8 @@ func LoadConfig(file string) (io.Reader, error) {
|
||||||
return EffectiveConfigFileLoader(file)
|
return EffectiveConfigFileLoader(file)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LoadExtConfig calls v2ctl to handle multiple config
|
||||||
|
// the actual work also in external module
|
||||||
func LoadExtConfig(files []string) (io.Reader, error) {
|
func LoadExtConfig(files []string) (io.Reader, error) {
|
||||||
if EffectiveExtConfigLoader == nil {
|
if EffectiveExtConfigLoader == nil {
|
||||||
return nil, newError("external config module not loaded").AtError()
|
return nil, newError("external config module not loaded").AtError()
|
||||||
|
|
Loading…
Reference in New Issue