Just about a month ago, I stumbled across this remarkably detailed yet succinct tutorial on how to write a barebones wiki using the Go programming language, or Golang, standard libraries. Before then, the extent of my programming experience was summed up as an absurd amount of poorly written bash scripts, and my rudimentary attempts at patching in minor features to Gitit, and other stuff I used. After seeing the relative simplicity of Golang after successfully building my ‘Gowiki’, I decided to see what else I could cook up…And you can see the final product here!
As of now, I’ve built in file and pastebin uploading from the command line and a form, a URL shortener to take advantage of my awesomely short es.gy domain and, made the ‘wiki’ features seen in the Golang tutorial into a little text ‘snippet’ feature, which I thought of for sharing Bash one-liners and such. If you can’t tell, the stylesheet is based entirely on my blogs', just brightened up to appear more wiki-like.
I’m very, very impressed with the ease at which I was able to pickup Golang and get all these little features built out, without being as hack-y as some of my past attempts at things of this nature. I can’t say I’ve ever been a fanboy of a programming language before, but I damn sure am one now! :)
Most recently, I replaced all the static file storage for pastes and text snippets with a boltdb backend, entirely coded in Golang, and was amazed at the simplicity at which I was able to accomplish what I thought was going to consist of rewriting the entire app. But nope, Golang’s coding style and way of working made it absurdly simple to just replace my existing save() functions with a boltdb wrapper. That process really blew me away, once I got the hang of how boltdb operates.
The source code is on my Github, but I need to rip out a lot of hardcoded values and implement a config file before making it public. I’m eager to see what people think of the source code itself.
Please feel free to use this crazy thing for your own needs, and if you have any comments, experience any issues, or Lords of Kobol forbid, find any vulnerabilities or security issues with the app, please email me at email@example.com!