iafan / goplayspace

Advanced Go Playground frontend written in Go, with syntax highlighting, turtle graphics mode, and more
https://goplay.space
Other
981 stars 63 forks source link

Add snippets management #4

Closed jostyee closed 7 years ago

jostyee commented 7 years ago

RT. It'd be much more convenient to organize code snippets via this tool.

iafan commented 7 years ago

Go Play Space currently works with the official Go Playground servers (and the plan is to remain such a frontend), which means there's no way to e.g. list or delete snippets, and all these snippets are essentially public (but not published) and anonymous.

But even with this limitation, I can see a benefit of having some sort of publicly searchable registry of snippets. Wish it was a part of official Go Playground, though.

jostyee commented 7 years ago

@iafan Thanks for your reply.

jostyee commented 7 years ago

@iafan How about switch to gist.github.com to store snippets?

iafan commented 7 years ago

I think this is still beyond the current scope of the project, and requires significant development efforts. I assume that Go Playground is usually used for a throw-away code; in cases when you want to save your snippet, you can just copy-paste your code somewhere (e.g. into a new Gist), or you can use the Share function and just bookmark the URL, so that you always have your snippets in the browser.

Since the code for Go Play Space is open-sourced, you may want to try experimenting with GitHub integration to see if this is something that would work for you as you imagine, and if its worth the effort.