[#3896bk] Support using configuration param inline with other values
This commit is contained in:
@@ -14,7 +14,6 @@ import (
|
||||
"gopkg.in/ini.v1"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -28,15 +27,6 @@ const (
|
||||
Xml = "xml"
|
||||
)
|
||||
|
||||
// Regex to match anything that has a value matching the format of {{ config.$1 }} which
|
||||
// will cause the program to lookup that configuration value from itself and set that
|
||||
// value to the configuration one.
|
||||
//
|
||||
// This allows configurations to reference values that are node dependent, such as the
|
||||
// internal IP address used by the daemon, useful in Bungeecord setups for example, where
|
||||
// it is common to see variables such as "{{config.docker.interface}}"
|
||||
var configMatchRegex = regexp.MustCompile(`^{{\s?config\.([\w.-]+)\s?}}$`)
|
||||
|
||||
type ConfigurationParser string
|
||||
|
||||
// Defines a configuration file for the server startup. These will be looped over
|
||||
|
||||
Reference in New Issue
Block a user