Profile cover photo
Profile photo
Gorilla web toolkit
A web toolkit for the Go programming language.
A web toolkit for the Go programming language.


Post has attachment
text/template can handle composition using skeleton templates. A simplified solution it demonstrated here:

The drawback of this solution is that you must assemble templates in code, by hand or using configuration or a filename convention to parse the right templates together. If you don't do it carefully, you end with "redefinition of template ..." errors.

The inconvenience of text/template comes from the fact that templates are not self-contained: given a set of templates, you must adapt code to achieve the desired composition scheme, or change templates to fit how they are assembled in code. Sometimes you also need to know how templates were named in code to achieve the same result.

This could be better. 

The Handlerbars' blog post below describes the problem in details and settles down to a solution we all know: inheritance, borrowed from Django templates. The idea transposed to text/template could look like this:

Following a single rule ("no duplicated template names") we can parse a large set of files, for example using ParseGlob("templates/*"), and multiple templates using the same skeleton template will just work. In other words: given a set of self-contained templates, we can parse them all without caring about which composition scheme it is using, because layout composition is part of the template language.


And hey, happy new year! :-)   #golang

Post has attachment
What happens when you merge text/template and html/template? Nothing. You get the same functionality but 1200 less lines of code, 33 less types, functions and methods and no locking during execution.

That sounds curious but, to be honest, API cleanup was not the main purpose to put the two packages together. Now we can think about small improvements in the template language without worrying about breakage, because text and html share the same execution code. A simpler API and faster execution are, of course, welcome. #golang

Post has attachment
It will be better to open the community and let everybody post what they are doing with Gorilla, share experiences and ask questions. Let the fun begin! :)  #golang
Add a comment...

Post has shared content
Hockeypuck uses gorilla/mux for routing. Wooo! #golang  
I’d like to share Hockeypuck, an OpenPGP Keyserver I’ve developed in pure Go.

Project Page:
Bugs & Roadmap:

How to install, build, etc:

Live instance (hosted by my employer, Gazzang):
Add a comment...

Post has attachment
Uriel pushed me to Go, and he was the very, very first person to look at the very first Gorilla code. We spent hours discussing how it should look like. :)

Nobody else was more passionate about Go than him. When there were so few resources available, he created, and kept making it the most relevant site about golang.

Then he created He advocated for golang on reddit and HN more frequently than one would say it's healthy. :) He was provocative but knew his stuff. He was not easy but had a huge heart. He valued simplicity and was damn smart, "always full of insight".

I'll be sad to think about the last time we talked. I've been away from IRC, and he asked what happened. I couldn't talk for long and said something vague. I'd do differently now, just to show how much I cared about his attention, his feedback and friendliness. It doesn't really matter now.

Our best wishes to his family and friends. Thanks for staying with us, Uriel.

And now good bye. :(
Add a comment...

Post has attachment
We now have a domain and it is not the most voted in the previous post:

But hey, it sounds cool, doesn't it?

Thanks to +Martin Marcher for the initial offer, and thanks to +Dusty Wilson for going ahead and grabbing it for us. Your support makes us thrilled. :)

#golang   #endangeredprimates  
Add a comment...

We are looking for a .org domain name! Please suggest a name in the comments, or +1 the names you like most.

It is ok to +1 multiple names, but please only suggest a single name per comment, and avoid other subjects. Thanks. :) #golang  
Add a comment...

Post has attachment
Good news, everyone! Gorilla is moving to GitHub:

Issues will be transferred gradually, and further development will happen in the new repos. This is not a personal preference; it is just a matter of popular demand. Let's get more people involved with the project.

Of course, import paths must be changed, but it is an easy find & replace operation. I hope this won't be that big of a deal. #golang  
Add a comment...

Post has attachment
There's an ongoing work happening behind the scenes of gorilla/mux. It will allow "pure-regexp" patterns or different variable syntaxes, positional variables and custom variable extractors or URL builders. Based on lots of feedback, it'll also cover use cases that should be easier or cleaner to implement. Conveniences related to subrouting, wrapping handlers, and other stuff.   

It all started when gorilla/pat was built on top of gorilla/mux. The result is close, but not identical. That left a feeling that both should use a lower level "muxing framework" with common stuff to do their job. The first step was to create gorilla/reverse, and just now it gained a bunch of interfaces and implementations of matchers, extractors and builders.

There's still a lot to do, many tests to write, but an internal prototype of gorilla/mux built on top of reverse looks a lot more flexible and cleaner. We'll get there. :)

Add a comment...

Post has shared content
This also serves as practical guide to gorilla/mux. Very nice.
Add a comment...
Wait while more posts are being loaded