mirror of
https://github.com/gotify/server.git
synced 2026-06-06 12:40:06 +08:00
Use gofmt -s
This commit is contained in:
committed by
Jannis Mattheis
parent
8d7c7a5a50
commit
0f2e7cf5e2
@@ -1,14 +1,15 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"errors"
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func withID(ctx *gin.Context, name string, f func(id uint)) {
|
||||
if id, err := strconv.ParseUint(ctx.Param(name), 10, 32); err == nil {
|
||||
f(uint(id));
|
||||
f(uint(id))
|
||||
} else {
|
||||
ctx.AbortWithError(400, errors.New("invalid id"))
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ func (a *MessageAPI) DeleteMessageWithApplication(ctx *gin.Context) {
|
||||
} else {
|
||||
ctx.AbortWithError(404, errors.New("application does not exists"))
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMessage deletes a message with an id.
|
||||
|
||||
@@ -4,13 +4,14 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/gotify/server/auth"
|
||||
"github.com/gotify/server/model"
|
||||
"net/http"
|
||||
"github.com/gotify/server/mode"
|
||||
"net/url"
|
||||
"github.com/gotify/server/model"
|
||||
)
|
||||
|
||||
var upgrader = websocket.Upgrader{
|
||||
|
||||
@@ -19,9 +19,9 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/gotify/server/auth"
|
||||
"github.com/gotify/server/mode"
|
||||
"github.com/gotify/server/model"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/gotify/server/mode"
|
||||
)
|
||||
|
||||
func TestFailureOnNormalHttpRequest(t *testing.T) {
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gotify/server/auth"
|
||||
"github.com/gotify/server/model"
|
||||
"github.com/gotify/server/auth/password"
|
||||
"github.com/gotify/server/model"
|
||||
)
|
||||
|
||||
// The UserDatabase interface for encapsulating database access.
|
||||
|
||||
Reference in New Issue
Block a user