|
@@ -156,7 +156,13 @@ func (s Map) ValueJSON(key string, defaultVal []byte) (res []byte) {
|
|
|
func (s Map) String(key, defaultVal string) string {
|
|
|
if iface, check := s[key]; check {
|
|
|
return val(iface, defaultVal).String()
|
|
|
- //return fmt.Sprint(iface)
|
|
|
+ }
|
|
|
+ return defaultVal
|
|
|
+}
|
|
|
+
|
|
|
+func (s Map) StringVal(key, defaultVal string) string {
|
|
|
+ if iface, check := s[key]; check {
|
|
|
+ return fmt.Sprint(iface)
|
|
|
}
|
|
|
return defaultVal
|
|
|
}
|