Kategorien
Allgemein

Using mgo and writing handlers in Go with net/http

This is a short example of how to write handlers in Go and use the MongoDB mgo driver.

Assume you want to write handlers that are in a package and mount this handler under a certain prefix,
for instance a HelloHandler mounted on /hello/.

So you have a main package and a handler package, called hello.

Directory structure is

~/go/src/example/hello/
~/go/src/example/hello/main.go
~/go/src/example/hello/hello/
~/go/src/example/hello/hello/hello.go

Run it

and navigate to http://localhost:8080/hello/

Kategorien
Allgemein

Neuer Blog

Habe eine neue Blogsoftware geschrieben, also proof of concept.

Mein Privater Blog lebt wieder, allerdings leicht versteckt. Wer ihn findet bekommt … nix.
Das ist der erste Schritt zur kompletten persönlichen Seite.
Dateien, Bilder, Blog, Wiki und was mir noch so einfällt.

Kategorien
Allgemein

Best Desktop Wallpaper for Work

Best desktop wallpaper for a workstation, imo.
Leaves room for imagination, no distraction, nothing too near, clouds.
road_field_sky_clouds_blue_country_open_spaces_trees_horizon_landscape_61181_2560x1600

Kategorien
Allgemein

Best Slug Matching Regex

From Stackoverflow

or short

Go version