Giter Site home page Giter Site logo

Comments (2)

congthang12312 avatar congthang12312 commented on September 17, 2024

I'm not sure about applying the split handler in your project. It will be a lifecycle import.
server.go using company/repository.go for do something ->So server.go need to import internal/company
company/handler.go using server.go -> So company/handler.go need to import internal/server
=>error lifecycle import will appear if you want to change to structure project. Because of server.go quite not good, server.go uses another repository. But repo and handler inside 1 pkg
for structure:

internal\
   company\
       handler.go (import server pkg)
       repository.go
   server\
       server.go (import company pkg)
===> error lifecycle import

I suggest you like this

internal\
   handler\
       company.go 
       developer.go
       ....
   server\
       server.go (import company pkg)
===> working

from job-board.

 avatar commented on September 17, 2024

i think it's too much work to restructure all the folders, we could just add subfolders for each domain entity

/company
  /handlers
    handler.go
  /repositories
    repository.go
  /models
    model.go

from job-board.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.