Profile

Cover photo
Gorilla web toolkit
877 followers|145,708 views
AboutPostsPhotosVideos

Stream

 
text/template can handle composition using skeleton templates. A simplified solution it demonstrated here: http://play.golang.org/p/aKfnfH6C3B

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: https://gist.github.com/4427246

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.

Thoughts?

And hey, happy new year! :-)   #golang
10
Rodrigo Moraes's profile photoNathan Youngman's profile photoGreg Worley's profile photo
10 comments
 
Do you have examples demonstrating the slot/fill templating?
Add a comment...

Gorilla web toolkit

Shared publicly  - 
 
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: https://launchpad.net/hockeypuck
Bugs & Roadmap: https://bugs.launchpad.net/hockeypuck

How to install, build, etc: https://bazaar.launchpad.net/~hockeypuck/hockeypuck/trunk/view/head:/README

Live instance (hosted by my employer, Gazzang): http://keyserver.gazzang.net
2
1
Add a comment...

Gorilla web toolkit

Shared publicly  - 
 
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  
4
1
Adam Stokes's profile photoDusty Wilson's profile photoMartin Marcher's profile photoMahdi Bolow's profile photo
12 comments
Add a comment...

Gorilla web toolkit

Shared publicly  - 
 
Good news, everyone! Gorilla is moving to GitHub:

    https://github.com/gorilla

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  
19
2
Martin Marcher's profile photoElazar Leibovich's profile photoKamil Kisiel's profile photoGorilla web toolkit's profile photo
16 comments
 
or getgorilla.org. I like gogorilla too, I think, but not the -web variant, to be honest. The appspot domain uses that because nothing else was available.
Add a comment...

Gorilla web toolkit

Shared publicly  - 
 
This may have gone unnoticed: all packages with external dependencies were recently moved to a separate repository: 

    http://code.google.com/p/sadbox/ 

This includes the gorilla/appengine/* and the sessions/mongodb packages.

(packages that are a moving target or that don't fit very well in the "web toolkit" idea, like gorilla/color, were moved as well)
 
The plan is to keep gorilla self-contained. There are now only few dependencies between gorilla packages -- context is used by mux, mux by pat, context and securecookie by sessions, rpc by rpc/json, and that's all. #golang  
6
Patrick Phalen's profile photo
 
I feel sorry for the sad logo.
Add a comment...
 
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
A fork of the standard template packages. Contribute to template development by creating an account on GitHub.
13
2
Add a comment...

Gorilla web toolkit

Shared publicly  - 
 
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
Gorilla Web Toolkit
A web toolkit for golang
View community
5
kishore bjv's profile photo
 
Why can't you adopt frame work like Rails? any issues with that?
Add a comment...

Gorilla web toolkit

Shared publicly  - 
 
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 go-lang.cat-v.org, and kept making it the most relevant site about golang.

Then he created reddit.com/r/golang. 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. :(
Resources: › arch ports · › books · › dev utils · › doc/ · › go code · › go search · › irc logs/ · › jobs · › library bindings · › organizations using go · › os ports · › other implementations · › pac...
36
2
Abiola Ibrahim's profile photo
 
go-lang.cat-v.org helped me back then in the early days of Go. I had a chat with him few times on IRC.

R.I.P Uriel :(
Add a comment...

Gorilla web toolkit

Shared publicly  - 
 
We now have a domain and it is not the most voted in the previous post:

    http://www.gorillatoolkit.org/

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  
Gorilla is a web toolkit for the Go programming language. Currently these packages are available: gorilla/context stores global request variables. gorilla/mux is a powerful URL router and dispatcher. ...
21
1
Martin Marcher's profile photoroger peppe's profile photoGorilla web toolkit's profile photoSergey Shepelev's profile photo
11 comments
 
Hello. Congratulations with new home.

Since you've moved from Google Code, i updated link on Go Projects wiki [1] to github, as it says on former hosting. You may wish to update both links to new website.

Go Projects wiki (previously Go Projects Dashboard) is very popular list of projects. I often consult it when i need some library or example.

[1] http://code.google.com/p/go-wiki/wiki/Projects
Add a comment...

Gorilla web toolkit

Shared publicly  - 
 
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. :)

#golang  
gorilla: Package gorilla/reverse is a set of utilities to create request routers.
9
1
Uriel Étranger's profile photoRodrigo Moraes's profile photo
2 comments
 
Your help designing the API was so enormous. I'm deeply grateful. Ping me about the server/proxy. :)
Add a comment...

Gorilla web toolkit

Shared publicly  - 
 
This also serves as practical guide to gorilla/mux. Very nice.
 
Painless Web Handlers in Go

Follow up to the great post that introduces web development in Go.

If you missed the first in the series, here it is: http://goo.gl/SZh37

  #golang  
Last time we made a little guestbook application, but there were a couple pain points. We had to have some boiler plate at the top of all of the …
3
Add a comment...

Gorilla web toolkit

Shared publicly  - 
 
we are back, baby. #golang  
Gorilla is a web toolkit for the Go programming language. Currently these packages are available: gorilla/context: storage for global request variables. gorilla/mux: request router and dispatcher. gor...
13
Медер Бакиров (.coder)'s profile photoJimmy Zelinskie's profile photoGorilla web toolkit's profile photoLevi Cook's profile photo
5 comments
 
Thank you. My first impressions of gorilla occurred while the site was offline. I ended up digging through the source quite a bit, and am glad for it. Good work in there, thanks for organizing and sharing it.
Add a comment...
Story
Tagline
A web toolkit for the Go programming language.