mirror of
https://github.com/gotify/server.git
synced 2024-01-28 15:20:56 +03:00
Format all go files
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
6
app.go
@@ -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"
|
||||
|
||||
@@ -2,9 +2,8 @@ package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package docs
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gobuffalo/packr"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Serve serves the documentation.
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user