Use gofmt -s

This commit is contained in:
Jannis Mattheis
2018-03-24 19:24:57 +01:00
committed by Jannis Mattheis
parent 8d7c7a5a50
commit 0f2e7cf5e2
16 changed files with 31 additions and 29 deletions

View File

@@ -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"))
}