Documentation ¶
Index ¶
- Constants
- Variables
- func AddElementAfterIndex(i int, slice, newSlice []string) []string
- func AddElementBeforeIndex(i int, slice, newSlice []string) []string
- func DeleteElement(i int, slice []string) []string
- func Difference(slice1, slice2 []string) []string
- func GetIndex(sliceArr []string, ele string) int
- func GetUUid() string
- func Intersect(slice1, slice2 []string) []string
- func RemoveDuplicationByStringSlice(arr []string) []string
- func ReplaceElement(i int, slice, newSlice []string) []string
Constants ¶
View Source
const ( Include = "00" //包含 NotInclude = "01" //不包含 IsSoftDelete = "00" //软删除,默认 NotSoftDelete = "01" //非软删除 ShowTypeByRow = "00" //导出时按行展示, 默认 ShowTypeByCol = "01" //导出时按列展示 AutoIncrement = "00" //主键字段自增, 默认 NotAutoIncrement = "01" //主键字段非自增 Delete = "00" //删除要替换的字段, 默认 NotDelete = "01" //不删除要替换的字段 FieldTypeIsString = "00" //普通字符串类型, 默认 FieldTypeIsSlice = "01" //[]interface{}类型 FieldTypeIsMap = "02" //map[string]interface{}类型 FieldTypeIsSliceByEleIsMap = "03" //[]map[string]interface{}类型 IsSingle = "00" NotIsSingle = "01" DefaultSheetName = "Sheet1" //默认的sheet页name ActionField = "操作(增/删/改)" //操作列 ActionFieldDefaultValue = "无" //操作列默认值 ActionAdd = "增" ActionDelete = "删" ActionUpdate = "改" ActionNo = "无" RepeatabilityCheck = "Repeatability_Check" //重复性校验 LegalityCheck = "Legality_Check" //合法性校验 NonEmptyCheck = "NonEmpty_Check" //非空检验 NonZeroCheck = "NonZero_Check" //非零校验 NullValue = "null" IsNotNull = `is not null` IsNull = `is null` //joinType LeftJoin = "00" RightJOIN = "01" InnerJoin = "02" Equal = "=" // 等于 UnEqual = "!=" // 不等于 )
Variables ¶
View Source
var ActionMap = map[string]struct{}{ ActionAdd: {}, ActionUpdate: {}, ActionDelete: {}, ActionNo: {}, }
ActionMap 操作类型map
Functions ¶
func AddElementAfterIndex ¶
AddElementAfterIndex ----add element after index=i
func AddElementBeforeIndex ¶
AddElementBeforeIndex ----add element before index=i
func DeleteElement ¶
func Difference ¶
Difference ----求 slice1-(slice1,slice2的交集)后的集合
func RemoveDuplicationByStringSlice ¶
数组去重
func ReplaceElement ¶
ReplaceElement ----use newSlice replace element at index=i
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.