array 增加 to string slice

This commit is contained in:
zhangdeman committed 2024-04-22 11:44:17 +08:00
1 parent ee726ea6bc
commit 8c922be06d
1 file changed
+14
+14
View File
@@ -231,6 +231,20 @@ func (at *Array) ConvertIgnoreError() []interface{} {
return res
}
// ToStringSlice ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 11:42 2024/4/22
func (at *Array) ToStringSlice() []string {
res := at.ConvertIgnoreError()
list := make([]string, 0)
for _, item := range res {
list = append(list, fmt.Sprintf("%v", item))
}
return list
}
// Unique 对数据结果进行去重
//
// Author : go_developer@163.com<白茶清欢>
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.