This is an automated email from the ASF dual-hosted git repository. abeizn pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit c3c96d8e1d13eec5d575778cfa1716f43335d06e Author: abeizn <[email protected]> AuthorDate: Wed Jul 20 18:10:15 2022 +0800 fix: purpose camel case and snake case --- generator/cmd/create_migration.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/cmd/create_migration.go b/generator/cmd/create_migration.go index 26e7f513..89acc852 100644 --- a/generator/cmd/create_migration.go +++ b/generator/cmd/create_migration.go @@ -124,9 +124,9 @@ func purposeNotExistValidate(input string) error { if input == `` { return errors.New("purpose require") } - camelNameReg := regexp.MustCompile(`^[A-Za-z][A-Za-z0-9]*$`) + camelNameReg := regexp.MustCompile(`^[a-z][A-Za-z0-9]*$`) if !camelNameReg.MatchString(input) { - return errors.New("purpose invalid (start with a-z and consist with a-z0-9)") + return errors.New("purpose invalid (please use camelCase format, start with a-z and consist with a-zA-Z0-9)") } return nil
