func tags(x interface{}) map[string]int {
	t := reflect.TypeOf(x)
	if t.Kind() == reflect.Ptr {
		t = t.Elem()
	}
	if t.Kind() != reflect.Struct {
		panic(errors.Errorf("expected struct, not %s", t))
	}

	if tagm := tagsForType[t]; tagm != nil {
		return tagm
	}
	panic(errors.Errorf("%s not found in type table", t))
}
// tags returns the field offsets for the JSON tags defined by the given value, which must be
// a struct or a pointer to a struct.
tags returns the field offsets for the JSON tags defined by the given value, which must be
a struct or a pointer to a struct.
// tags returns the field offsets for the JSON tags defined by the given value which must be // a struct or a pointer to a struct .
func tags(x interface{}) map[string]int {
	t := reflect.TypeOf(x)
	if t.Kind() == reflect.Ptr {
		t = t.Elem()
	}
	if t.Kind() != reflect.Struct {
		panic(errors.Errorf("expected struct, not %s", t))
	}
	if tagm := tagsForType[t]; tagm != nil {
		return tagm
	}
	panic(errors.Errorf("%s not found in type table", t))
}
func tags ( x interface { } ) map [ string ] int { t := reflect . TypeOf ( x ) if t . Kind ( ) == reflect . Ptr { t = t . Elem ( ) } if t . Kind ( ) != reflect . Struct { panic ( errors . Errorf ( " " , t ) ) } if tagm := tagsForType [ t ] ; tagm != nil { return tagm } panic ( errors . Errorf ( " " , t ) ) }
tags returns the field offsets for the JSON tags defined by the given value, which must be
a struct or a pointer to a struct.
tags returns the field offsets for the JSON tags defined by the given value which must be a struct or a pointer to a struct .