Run goimports on all files in the project to format imports

This commit is contained in:
Matthias Loibl 2016-12-25 16:37:45 +01:00
parent ec6d3e004b
commit 7c0cfd83a0
No known key found for this signature in database
GPG Key ID: B1C7DF661ABB2C1A
8 changed files with 20 additions and 13 deletions

View File

@ -2,12 +2,13 @@ package api
import ( import (
"encoding/json" "encoding/json"
"net/http"
"os"
"github.com/dannyvankooten/ana/db" "github.com/dannyvankooten/ana/db"
"github.com/dannyvankooten/ana/models" "github.com/dannyvankooten/ana/models"
"github.com/gorilla/sessions" "github.com/gorilla/sessions"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"net/http"
"os"
) )
type Login struct { type Login struct {

View File

@ -2,11 +2,12 @@ package api
import ( import (
"encoding/base64" "encoding/base64"
"net/http"
"strings"
"github.com/dannyvankooten/ana/db" "github.com/dannyvankooten/ana/db"
"github.com/dannyvankooten/ana/models" "github.com/dannyvankooten/ana/models"
"github.com/mssola/user_agent" "github.com/mssola/user_agent"
"net/http"
"strings"
) )
func getRequestIp(r *http.Request) string { func getRequestIp(r *http.Request) string {

View File

@ -2,8 +2,9 @@ package api
import ( import (
"encoding/json" "encoding/json"
"github.com/dannyvankooten/ana/count"
"net/http" "net/http"
"github.com/dannyvankooten/ana/count"
) )
// URL: /api/countries // URL: /api/countries

View File

@ -2,10 +2,11 @@ package api
import ( import (
"encoding/json" "encoding/json"
"net/http"
"github.com/dannyvankooten/ana/count" "github.com/dannyvankooten/ana/count"
"github.com/dannyvankooten/ana/db" "github.com/dannyvankooten/ana/db"
"github.com/dannyvankooten/ana/models" "github.com/dannyvankooten/ana/models"
"net/http"
) )
// URL: /api/pageviews // URL: /api/pageviews

View File

@ -2,9 +2,10 @@ package api
import ( import (
"encoding/json" "encoding/json"
"net/http"
"github.com/dannyvankooten/ana/count" "github.com/dannyvankooten/ana/count"
"github.com/dannyvankooten/ana/db" "github.com/dannyvankooten/ana/db"
"net/http"
) )
// URL: /api/visitors/count // URL: /api/visitors/count

View File

@ -1,12 +1,13 @@
package commands package commands
import ( import (
"github.com/dannyvankooten/ana/api"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
"log" "log"
"net/http" "net/http"
"os" "os"
"github.com/dannyvankooten/ana/api"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
) )
func startServer() { func startServer() {

View File

@ -1,10 +1,11 @@
package commands package commands
import ( import (
"log"
"github.com/dannyvankooten/ana/db" "github.com/dannyvankooten/ana/db"
"github.com/dannyvankooten/ana/models" "github.com/dannyvankooten/ana/models"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"log"
) )
func createUser() { func createUser() {

View File

@ -2,10 +2,10 @@ package db
import ( import (
"fmt" "fmt"
"github.com/Pallinder/go-randomdata"
"github.com/dannyvankooten/ana/models"
"math/rand" "math/rand"
"time" "time"
"github.com/dannyvankooten/ana/models"
) )
var browserNames = []string{ var browserNames = []string{