Code Monkey home page Code Monkey logo

Comments (3)

rgeraldes avatar rgeraldes commented on August 17, 2024
  • routing: strict slash method just needs to be applied once to the main router vs apply to all the routes (doc: any subrouters created from that route inherit the original StrictSlash setting.)
  • routing: fullRoute := v1.PoliteiaWWWAPIRoute + route is not necessary as we can create a sub router based on a prefix.
  • it's not easy to figure out right away the entry point of the repo: remove www.go and separate the logic between main.go (server creation and startup) and server.go
  • add graceful shutdown for multiple web servers.
    (examples: https://gist.github.com/peterhellberg/38117e546c217960747aacf689af3dc2)
  • Replace print + os.Exit with log.Fatal (same thing)
  • replace go to in the for select with a tag before the for loop called for instance L and do a break L inside the select.
  • replace *sessions.FilesystemStore with the interface sessions.Store in the PoliteiaWWW struct.
  • name conventions, ex: userHttpCode should be userHTTPCode

from politeia.

sndurkin avatar sndurkin commented on August 17, 2024

@rgeraldes I like these cleanup ideas, although I'm not sure what you're referring to with the last one.

@marcopeereboom what do you think?

from politeia.

marcopeereboom avatar marcopeereboom commented on August 17, 2024

I think this has taken too long.

from politeia.

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.