How to check interface is a map[string]string in golang
<p>I want to check the output variable is map[string]string or not.
the output should be a map[string]string and it should be a ptr.</p>

<p>I checked ptr value. But I don't know how to check the key of map if is string or not.</p>

<blockquote>
  <p>sorry for my bad english</p>
</blockquote>

<pre><code>import (
    "fmt"
    "reflect"
)

func Decode(filename string, output interface{}) error {
    rv := reflect.ValueOf(output)
    if rv.Kind() != reflect.Ptr {
        return fmt.Errorf("Output should be a pointer of a map")
    }
    if rv.IsNil() {
        return fmt.Errorf("Output in NIL")
    }
    fmt.Println(reflect.TypeOf(output).Kind())
    return nil
}
</code></pre>