package constant // 资源类型 type ResourceTypeEnum int const ( Image ResourceTypeEnum = iota // = 0 Video // = 1 Audio ) func (actionType ResourceTypeEnum) String() string { names := []string{"图片", "视频", "音频"} return names[actionType] }