Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Funcs = map[string]interface{}{ "join": strings.Join, "elem": func(i interface{}) interface{} { v := reflect.ValueOf(i) for v.Kind() == reflect.Ptr { v = v.Elem() } return v.Interface() }, "trimZero": func(v interface{}) interface{} { s := fmt.Sprint(v) if s == "0" { return "" } return s }, "trimPrefix": func(s, prefix string) string { return strings.TrimPrefix(s, prefix) }, }
View Source
var Options = &struct { DockerEndpoint string DockerAPIVersion string DBType string DBAddress string AuthTimeout time.Duration }{ DBType: "mongo", DBAddress: "localhost:27017/swirl", AuthTimeout: 30 * time.Minute, }
Options holds custom options of swirl.
View Source
var TimeZones = []struct { Name string Offset int32 // seconds east of UTC }{ {"GMT", 0}, {"GMT+12", 12 * 60 * 60}, {"GMT+11", 11 * 60 * 60}, {"GMT+10", 10 * 60 * 60}, {"GMT+9", 9 * 60 * 60}, {"GMT+8(Asia/Shanghai)", 8 * 60 * 60}, {"GMT+7", 7 * 60 * 60}, {"GMT+6", 6 * 60 * 60}, {"GMT+5", 5 * 60 * 60}, {"GMT+4", 4 * 60 * 60}, {"GMT+3", 3 * 60 * 60}, {"GMT+2", 2 * 60 * 60}, {"GMT+1", 1 * 60 * 60}, {"GMT-1", -1 * 60 * 60}, {"GMT-2", -2 * 60 * 60}, {"GMT-3", -3 * 60 * 60}, {"GMT-4", -4 * 60 * 60}, {"GMT-5", -5 * 60 * 60}, {"GMT-6", -6 * 60 * 60}, {"GMT-7", -7 * 60 * 60}, {"GMT-8", -8 * 60 * 60}, {"GMT-9", -9 * 60 * 60}, {"GMT-10", -10 * 60 * 60}, {"GMT-11", -11 * 60 * 60}, {"GMT-12", -12 * 60 * 60}, }
TimeZones holds some commonly used time-zones.
Functions ¶
func JSONIndent ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.