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

feat: alternative of existing skeleton #1

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Conversation

WasinWatt
Copy link
Collaborator

@WasinWatt WasinWatt commented Sep 4, 2024

  • cmd just call <command>.New() to start the flow, no extra setup call (complicated stuff should be inside <command>
  • each subfoler in models is responsible for a specific root command that needs tea.model
  • each root command contains its own state (defined in <rootcommand>/state.go , passing state is simple. Take a look at demo subfolder
  • sub command models live inside root command's subfolder. Ex. vm_select.go lives in models/demo

please be mindful that this repo should/could be open-sourced in the future.

Good characteristics of a good skeleton.

  • Files and folders are organized. Devs should know how to create files / how to name / etc. just by reading the code. Feature development should be easy and can be parallel
  • Easy to read and extend ideas from. Global storage thing is too much IMO.

General Feedback

  • Function like ResetStates shouldn't exist in implementation files (can live in a mock struct or test files)
  • Use Mocks & good mock library

@traviolus traviolus merged commit 78ee0fb into main Sep 5, 2024
1 check failed
@traviolus traviolus deleted the feat/skeleton-refactor branch September 5, 2024 06:55
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.

2 participants