|
@@ -91,7 +91,12 @@ func cutString(str string, lens int) string { |
|
|
func jobNamePrefixValid(s string) string { |
|
|
func jobNamePrefixValid(s string) string { |
|
|
lowStr := strings.ToLower(s) |
|
|
lowStr := strings.ToLower(s) |
|
|
re := regexp.MustCompile(`[^a-z0-9_\\-]+`) |
|
|
re := regexp.MustCompile(`[^a-z0-9_\\-]+`) |
|
|
return re.ReplaceAllString(lowStr, "") |
|
|
|
|
|
|
|
|
//去掉非法字符 |
|
|
|
|
|
removeSpecial := re.ReplaceAllString(lowStr, "") |
|
|
|
|
|
//任务名以数字字母开头,去掉非法前缀 |
|
|
|
|
|
re = regexp.MustCompile(`^[_\\-]+`) |
|
|
|
|
|
return re.ReplaceAllString(removeSpecial, "") |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func cloudBrainNewDataPrepare(ctx *context.Context) error{ |
|
|
func cloudBrainNewDataPrepare(ctx *context.Context) error{ |
|
|