Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add comment #36

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

add comment #36

wants to merge 16 commits into from

Conversation

hktk1001
Copy link

add comment
增加数据库的注释

@coveralls
Copy link

coveralls commented Oct 20, 2020

Coverage Status

Coverage decreased (-20.9%) to 72.586% when pulling b03eccf on hktk1001:master into 2234744 on Shelnutt2:master.

Copy link
Owner

@Shelnutt2 Shelnutt2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR! I have a few comments, but the addition of the comment field is quite nice!

@@ -1,10 +1,13 @@
module github.com/Shelnutt2/db2struct
module hktk1001/db2struct
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the mod files (go.mod and go.sum), the changes here look like they are only from your fork?

utils_mysql.go Outdated
@@ -95,20 +96,30 @@ func generateMysqlTypes(obj map[string]map[string]string, depth int, jsonAnnotat
annotations = append(annotations, fmt.Sprintf("gorm:\"column:%s%s\"", key, primary))
}
if jsonAnnotation == true {
annotations = append(annotations, fmt.Sprintf("json:\"%s\"", key))
res :=Lcfirst(Case2Camel(key))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the json changes, it looks like your goal is to support different json name format right? snake case vs camel, etc? If so I believe the behavior should be added as a option the user passes in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants