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

improvements: restructure go modules #229

Open
Anmol1696 opened this issue Sep 12, 2023 · 0 comments
Open

improvements: restructure go modules #229

Anmol1696 opened this issue Sep 12, 2023 · 0 comments

Comments

@Anmol1696
Copy link
Collaborator

Overview

Currently the structure is flat which ends up looking like:

starship/
	cmd/
	  starship/
	registry/
  faucet/
  exposer/
  client/
  tools/
  ...

The benifit of this structure is:

  • Seperate go.mod for each of the components
  • Each component has its own build system as well as Dockerfile

Proposal

We should restructure the go modules such that they become part of the same go.mod as well. Something like:

starship/
  cmd/
    cli/
    registry/
    faucet/
    exposer/
pkg/
  registry/
  faucet/
  exposer/
  client/
  tools/
go.mod

Pros:

  • Cleaner structure in the root dir
  • Single go.mod will be needed (can have seperate ones too)
  • Can couple config logging together as well into one system.

Cons:

  • Different versions release wont be easy to do next (currently we dont have differnt versions anyways)
  • All the pkgs will be around being http handlers and a microservice instead of packages.
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

No branches or pull requests

1 participant