Goweb 2 just launched

68 views
Skip to first unread message

matryer

unread,
May 31, 2013, 2:21:24 PM5/31/13
to golang...@googlegroups.com
Goweb 2 is now ready to go... 

The API Documentation provided by GoDoc (which we love) tells you all you need to know... and now you can get going with `go get github.com/stretchrcom/goweb`.  Nice and easy.

Enjoy,

Mat & Tyler
(The Goweb team)

tao

unread,
Jun 2, 2013, 3:56:22 AM6/2/13
to golang...@googlegroups.com
Thank you for your great work!

-- 
tao
Sent with Sparrow

--
You received this message because you are subscribed to the Google Groups "goweb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-goweb...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Mat Ryer

unread,
Jun 2, 2013, 12:43:46 PM6/2/13
to golang...@googlegroups.com
You're welcome Tao - we look forward to your feedback and ideas. 

Mat

You received this message because you are subscribed to a topic in the Google Groups "goweb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-goweb/ZWcIudRpV6E/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to golang-goweb...@googlegroups.com.

Derek Buitenhuis

unread,
Jun 15, 2013, 6:47:13 PM6/15/13
to golang...@googlegroups.com
Do you intend to do versioned releases as you did in v1 (perhaps via git tags)?

I'm not a huge fan of "just use 'go get <url>'", because it encourages messy dependency handling and can be hell when rebuilding elsewhere (stuff may have changed in HEAD).

P.S. I love goweb, and am currently using 1.4 in production.

Cheers,
- Derek

tao

unread,
Jul 24, 2013, 8:54:14 AM7/24/13
to golang...@googlegroups.com
I am a new developer to REST.

func (r *ThingsController) Read(id string, ctx context.Context) error {
for _, thing := range r.Things {
if thing.Id == id {
return goweb.API.RespondWithData(ctx, thing)
}
}

return goweb.Respond.WithStatus(ctx, http.StatusNotFound)
}

does the code above only support api_uri/id ?

If I want more parameters, I should use goweb.Map ?   If that, I fell the MapController is redundant ?

-- 
tao
Sent with Sparrow

--

matryer

unread,
Jul 25, 2013, 12:26:52 PM7/25/13
to golang...@googlegroups.com
Tao,


What kinds of paths do you want to map?

Mat

tao

unread,
Jul 27, 2013, 8:53:42 AM7/27/13
to golang...@googlegroups.com
urlpatterns = patterns('',
    url(r'^articles/2003/$', 'news.views.special_case_2003'),
    url(r'^articles/(?P<year>\d{4})/$', 'news.views.year_archive'),
    url(r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'news.views.month_archive'),
    url(r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', 'news.views.article_detail'),
)

I want to map paths like the above (from Django).

In short, I want to capture more than one parameters in one path.


-- 
tao
Sent with Sparrow

Mat Ryer

unread,
Jul 27, 2013, 9:39:45 AM7/27/13
to golang...@googlegroups.com
The way to do that now is to 'manually' use the Map method. 

You can still use controllers if you like, see the code for MapController in the handlers package. 

It might be nice to add a MapRoutes method to your controller and just cal that (passing in the goweb.DefaultHttpHandler()) so you can keep your code tidy - but that's up to you.

Hope that helps. 

Mat
You received this message because you are subscribed to a topic in the Google Groups "goweb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-goweb/ZWcIudRpV6E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-goweb...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages