-
Notifications
You must be signed in to change notification settings - Fork 39
/
config.go
23 lines (20 loc) · 717 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2017 Seamia Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
//----------------------------------------------------------------------------------------------------------------------
var g_config map[string]interface{}
func options(name string) bool {
if g_config != nil && len(name) > 0 {
if copts, found := g_config["options"]; found {
opts, found := copts.(map[string]interface{})
if found && len(opts) > 0 {
if value, found := opts[name]; found {
return value.(bool)
}
}
}
}
trace("Option [" + name + "] was not found - returning the default: false")
return false
}