array 增加 to string slice
This commit is contained in:
		
							
								
								
									
										14
									
								
								array.go
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								array.go
									
									
									
									
									
								
							@ -231,6 +231,20 @@ func (at *Array) ConvertIgnoreError() []interface{} {
 | 
				
			|||||||
	return res
 | 
						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 对数据结果进行去重
 | 
					// Unique 对数据结果进行去重
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Author : go_developer@163.com<白茶清欢>
 | 
					// Author : go_developer@163.com<白茶清欢>
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user