package main

import (
	"flag"
	"log"
	"net/http"

	"github.com/julienbayle/jeparticipe/app"
)

func main() {

	var (
		// Path to the database
		dbFile = flag.String("db", "jeparticipe.db", "Path to the BoltDB file")

		// Application port
		port = flag.String("port", "8090", "Server port")

		// Application base path
		baseUrl = flag.String("baseurl", "", "Base URL on the server (example : /api)")
	)

	flag.Parse()

	jeparticipe := app.NewApp(*dbFile)
	defer jeparticipe.ShutDown()

	api := jeparticipe.BuildApi(app.ProdMode, *baseUrl)
	log.Fatal(http.ListenAndServe(":"+*port, api.MakeHandler()))
}

package main

import (
	"flag"
	"log"
	"net/http"

	"github.com/ant0ine/go-json-rest/rest"
	"github.com/julienbayle/jeparticipe/app"
)

func main() {

	var (
		// Path to the database
		dbFile = flag.String("db", "jeparticipe.db", "Path to the BoltDB file")

		// Application port
		port = flag.String("port", "8090", "Server port")

		// Application base path
		baseUrl = flag.String("baseurl", "", "Base URL on the server (example : /api)")
	)

	flag.Parse()

	app := app.NewApp(*dbFile)
	defer app.ShutDown()

	api := app.BuildApi(app.ProdMode, *baseUrl)
	log.Fatal(http.ListenAndServe(":"+*port, api.MakeHandler()))
}

--- 
+++ 
@@ -5,7 +5,6 @@
 	"log"
 	"net/http"
 
-	"github.com/ant0ine/go-json-rest/rest"
 	"github.com/julienbayle/jeparticipe/app"
 )
 
@@ -24,9 +23,9 @@
 
 	flag.Parse()
 
-	app := app.NewApp(*dbFile)
-	defer app.ShutDown()
+	jeparticipe := app.NewApp(*dbFile)
+	defer jeparticipe.ShutDown()
 
-	api := app.BuildApi(app.ProdMode, *baseUrl)
+	api := jeparticipe.BuildApi(app.ProdMode, *baseUrl)
 	log.Fatal(http.ListenAndServe(":"+*port, api.MakeHandler()))
 }
Remove unused imports and rename app "jeparticpe" instead of "app"
