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