jdockerty / jsonnet-playground

Playground for Jsonnet, inspired by Go/Rust projects of similar names.
https://jsonnet.jdocklabs.co.uk
MIT License
2 stars 0 forks source link

Refactor `Handle*` to be apart of the `PlaygroundServer` #36

Closed jdockerty closed 5 months ago

jdockerty commented 6 months ago

By having these routes hang from PlaygroundServer, this means we can remove the erroneous use of *state.State being passed into every function.

This should look like this:

func (s *PlaygroundServer) HandleRun() { ... }

Once this is done, we have access to the internal State already and do not need to explicitly pass it in every single time from outside.