Format all go files

This commit is contained in:
Jannis Mattheis
2019-01-01 19:48:28 +01:00
parent 2a0e84cdcb
commit 68b160997d
14 changed files with 31 additions and 48 deletions

View File

@@ -1,18 +1,16 @@
package api
import (
"math/rand"
"net/http/httptest"
"testing"
"strings"
"bytes"
"errors"
"io"
"io/ioutil"
"math/rand"
"mime/multipart"
"net/http/httptest"
"os"
"strings"
"testing"
"github.com/gin-gonic/gin"
"github.com/gotify/server/mode"

View File

@@ -3,11 +3,9 @@ package api
import (
"math/rand"
"net/http/httptest"
"testing"
"strings"
"net/url"
"strings"
"testing"
"github.com/gin-gonic/gin"
"github.com/gotify/server/mode"

View File

@@ -2,11 +2,10 @@ package api
import (
"errors"
"strconv"
"strings"
"time"
"strconv"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"github.com/gotify/location"

View File

@@ -2,21 +2,18 @@ package api
import (
"net/http/httptest"
"net/url"
"strings"
"testing"
"time"
"github.com/gin-gonic/gin"
"github.com/gotify/server/auth"
"github.com/gotify/server/mode"
"github.com/gotify/server/model"
"github.com/gotify/server/test"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"strings"
"net/url"
"github.com/gotify/server/auth"
)
func TestMessageSuite(t *testing.T) {

View File

@@ -5,8 +5,8 @@
package stream
import (
"sync/atomic"
"sync"
"sync/atomic"
)
// Modified version of sync.Once (https://github.com/golang/go/blob/master/src/sync/once.go)

View File

@@ -1,13 +1,12 @@
package stream
import (
"net/http"
"net/url"
"regexp"
"sync"
"time"
"net/http"
"net/url"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/gotify/server/auth"

View File

@@ -3,6 +3,7 @@ package stream
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"net/http"
"net/http/httptest"
@@ -10,8 +11,6 @@ import (
"testing"
"time"
"errors"
"github.com/fortytw2/leaktest"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"

6
app.go
View File

@@ -1,12 +1,10 @@
package main
import (
"math/rand"
"time"
"fmt"
"math/rand"
"os"
"time"
"github.com/gotify/server/config"
"github.com/gotify/server/database"

View File

@@ -2,9 +2,8 @@ package config
import (
"os"
"testing"
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)

View File

@@ -1,9 +1,10 @@
package docs
import (
"strings"
"github.com/gin-gonic/gin"
"github.com/gobuffalo/packr"
"strings"
)
// Serve serves the documentation.

View File

@@ -2,13 +2,11 @@ package error
import (
"fmt"
"github.com/gin-gonic/gin"
"net/http"
"strings"
"unicode"
"github.com/gin-gonic/gin"
"github.com/gotify/server/model"
"gopkg.in/go-playground/validator.v8"
)

View File

@@ -1,24 +1,22 @@
package router
import (
"net/http"
"time"
"github.com/gin-gonic/gin"
"github.com/gotify/server/api"
"github.com/gotify/server/auth"
"github.com/gotify/server/database"
"github.com/gotify/server/error"
"github.com/gotify/server/ui"
"github.com/jmattheis/go-packr-swagger-ui"
"net/http"
"github.com/gotify/location"
"github.com/gotify/server/api"
"github.com/gotify/server/api/stream"
"github.com/gotify/server/auth"
"github.com/gotify/server/config"
"github.com/gotify/server/database"
"github.com/gotify/server/docs"
"github.com/gotify/server/error"
"github.com/gotify/server/mode"
"github.com/gotify/server/model"
"github.com/gotify/server/ui"
"github.com/jmattheis/go-packr-swagger-ui"
)
// Create creates the gin engine with all routes.

View File

@@ -3,11 +3,10 @@ package runner
import (
"crypto/tls"
"fmt"
"log"
"net"
"net/http"
"log"
"github.com/gin-gonic/gin"
"github.com/gotify/server/config"
"golang.org/x/crypto/acme/autocert"