Questions tagged [martini]

Martini is a popular, lightweight web framework for Go.

Martini is a powerful package for quickly writing modular web applications/services in Go.

More information: https://github.com/codegangsta/martini

Contributed add-ons: https://github.com/codegangsta/martini-contrib

69 questions
0
votes
1 answer

Set Martini Log Path

How do I set the martini log path to some random file. It is now displaying in console. m := martini.Classic() Thanks for the help
0
votes
1 answer

Can't use struct from own package

I created following file structure in $GOPATH/src bitbucket.org/MyName/ProjectName I have follwoing files here ProjectName - controllers/ - meController.go - app.go In app.go I'm importing my controller like that: import…
Sekhmet
  • 523
  • 1
  • 7
  • 21
0
votes
1 answer

How to use URI as a REST resource?

I am building a RESTful API for retrieving and storing comments in threads. A comment thread is identified by an arbitrary URI -- usually this is the URL of the web page where the comment thread is related to. This design is very similar to what…
0
votes
1 answer

Go huge file download and passing to client (proxifying)

I have a small Martini-based application and am faced with an issue that I can't solve. I want to add an application feature that would allow the user to get files from a 3rd server with some changes in HTTP headers. Some kind of proxy. The files…
CrazyCrow
  • 4,125
  • 1
  • 28
  • 39
-1
votes
1 answer

Martini render shows {{ yield }} on page

I try to render my page in martini layout.html ...
...
{{ yield }}
...
index.html

Hello

Render…
-1
votes
2 answers

How to append URI as string in SQL query

Looks simple but I unable to make it happen. When browsing domain.com/post/1, it should show data from row id which value 1. Row id is integer (int4). Below the the codes, which is not working: package main import "fmt" import…
apasajja
  • 576
  • 2
  • 6
  • 20
-1
votes
1 answer

How can I output CSV with martini?

I would like to print CSV-data to the output with martini. Currently, I have always used r.JSON(200, somestruct) where r is a render.Render from github.com/martini-contrib. Now I have an slice of structs and I would like to print them as CSV…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
-1
votes
1 answer

Not able to access static webpage index.html via martini framework

Hi I am trying to access and display a static index.html page via martini framework. But I am always getting 404 not found error. The .html file is in public/index.html where the /public directory is in my go/src/github.com/user/ directory. I am…
dupree
  • 1
  • 1
-4
votes
1 answer

route method becomes undefined in main package file

My code is as shown below : app.go package main import ( "github.com/go-martini/martini" ) func main() { app := martini.Classic() app.Group("/books", func(r martini.Router) { r.Get("/:id", getBooks) r.Post("/new",…
Mrugesh
  • 4,381
  • 8
  • 42
  • 84
1 2 3 4
5