fix reading allow snippet config
This commit is contained in:
parent
95efaf3e39
commit
9d46378f12
1 changed files with 10 additions and 0 deletions
|
@ -70,6 +70,7 @@ const (
|
||||||
plugins = "plugins"
|
plugins = "plugins"
|
||||||
debugConnections = "debug-connections"
|
debugConnections = "debug-connections"
|
||||||
workerSerialReloads = "enable-serial-reloads"
|
workerSerialReloads = "enable-serial-reloads"
|
||||||
|
allowSnippetAnnotations = "allow-snippet-annotations"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -122,6 +123,15 @@ func ReadConfig(src map[string]string) config.Configuration {
|
||||||
luaSharedDicts := make(map[string]int)
|
luaSharedDicts := make(map[string]int)
|
||||||
debugConnectionsList := make([]string, 0)
|
debugConnectionsList := make([]string, 0)
|
||||||
|
|
||||||
|
if val, ok := conf[allowSnippetAnnotations]; ok {
|
||||||
|
boolValue, err := strconv.ParseBool(val)
|
||||||
|
if err != nil {
|
||||||
|
klog.Errorf("Ignoring poorly formatted value %v for allow-snippet-annotations", val)
|
||||||
|
} else {
|
||||||
|
to.AllowSnippetAnnotations = boolValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// parse lua shared dict values
|
// parse lua shared dict values
|
||||||
if val, ok := conf[luaSharedDictsKey]; ok {
|
if val, ok := conf[luaSharedDictsKey]; ok {
|
||||||
delete(conf, luaSharedDictsKey)
|
delete(conf, luaSharedDictsKey)
|
||||||
|
|
Loading…
Reference in a new issue