You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
360 B

package excel
import (
"reflect"
"strings"
)
type TagAttr struct {
Name string
Style string
Auth string
}
func (t *TagAttr) initTag(data map[string]string) {
v := reflect.ValueOf(t).Elem()
for name, value := range data {
field := v.FieldByName(strings.Title(name))
if !field.IsValid() {
continue
}
field.Set(reflect.ValueOf(value))
}
}