-
Notifications
You must be signed in to change notification settings - Fork 5
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
refactor: Migration from Survey
to Charm huh
#30
Conversation
Signed-off-by: Harsh4902 <harshparmar4902@gmail.com>
Signed-off-by: Harsh4902 <harshparmar4902@gmail.com>
Thanks for the PR @Harsh4902 |
Validate(func(str string) error { | ||
return helpers.ValidateApplicationName(str) | ||
}). | ||
Value(&answers.AppName), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To retain the existing behavior of providing "Default" values, we can initialize answers := ProjectConfig{}
with default values.
generators/spring-boot/prompts.go
Outdated
Default: []string{"Spring Modulith", "Thymeleaf", "Security"}, | ||
}, | ||
}, | ||
} | ||
answers := ProjectConfig{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change answers := ProjectConfig{}
to the following:
answers := ProjectConfig{
AppName: "myapp",
GroupID: "com.mycompany",
ArtifactID: "myapp",
AppVersion: "1.0.0-SNAPSHOT",
BasePackage: "com.mycompany.myapp",
BuildTool: "Maven",
DbType: "PostgreSQL",
DbMigrationTool: "Flyway",
Features: []string{"Spring Modulith", "Thymeleaf", "Security"},
}
generators/minimal-java/prompts.go
Outdated
Default: "Maven", | ||
}, | ||
}, | ||
} | ||
answers := ProjectConfig{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace answers := ProjectConfig{}
to the following:
answers := ProjectConfig{
AppName: "myapp",
GroupID: "com.mycompany",
ArtifactID: "myapp",
AppVersion: "1.0.0-SNAPSHOT",
BasePackage: "com.mycompany.myapp",
BuildTool: "Maven",
}
generators/minimal-go/prompts.go
Outdated
}, | ||
}, | ||
} | ||
|
||
answers := ProjectConfig{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change answers := ProjectConfig{}
to the following:
answers := ProjectConfig{
AppName: "myapp",
ModulePath: "github.com/username/myapp",
RoutingLibrary: "Gin",
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall a great job porting the Survey lib to Charm huh 👍
Could you please make the suggested changes to the PR?
Signed-off-by: Harsh4902 <harshparmar4902@gmail.com>
@sivaprasadreddy Yes sir. I was thinking the same, but I was not sure. Thank you for suggesting, I have implemented the changes. |
Signed-off-by: Harsh4902 <harshparmar4902@gmail.com>
Description
charm huh
, and considers migration fromsurvey
because it is not maintained anymore.Changes
huh.form
..gitignore
to ignore.DS_Store
file of MacOS.Related Issue(s)
Resolves #13
New CLI