Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add server gofmt lint

Manav Rathieeac40e7cdf7
diff --git a/server/ente/collection_action.go b/server/ente/collection_action.go
index d914e74a43..c2735d2c92 100644
--- a/server/ente/collection_action.go
+++ b/server/ente/collection_action.go
@@ -1,14 +1,14 @@
package ente
type CollectionAction struct {
- ID string `json:"id"`
- UserID int64 `json:"userID"`
- ActorUserID int64 `json:"actorUserID"`
- CollectionID int64 `json:"collectionID"`
- FileID *int64 `json:"fileID,omitempty"`
- Action string `json:"action"`
- IsPending bool `json:"isPending"`
- Data map[string]interface{} `json:"data,omitempty"`
- CreatedAt int64 `json:"createdAt"`
- UpdatedAt int64 `json:"updatedAt"`
+ ID string `json:"id"`
+ UserID int64 `json:"userID"`
+ ActorUserID int64 `json:"actorUserID"`
+ CollectionID int64 `json:"collectionID"`
+ FileID *int64 `json:"fileID,omitempty"`
+ Action string `json:"action"`
+ IsPending bool `json:"isPending"`
+ Data map[string]interface{} `json:"data,omitempty"`
+ CreatedAt int64 `json:"createdAt"`
+ UpdatedAt int64 `json:"updatedAt"`
}
diff --git a/server/ente/paste.go b/server/ente/paste.go
index c15446366c..a3fa08dd45 100644
--- a/server/ente/paste.go
+++ b/server/ente/paste.go
@@ -7,14 +7,14 @@ import (
)
const (
- pasteKdfSaltBytes = 16
- pasteKdfNonceMaxLength = 64
- pasteKdfMemLimitInteractive = 64 * 1024 * 1024
- pasteKdfOpsLimitInteractive = 2
- pasteKdfMemLimitModerate = 256 * 1024 * 1024
- pasteKdfOpsLimitModerate = 3
- pasteDecryptionHeaderMaxLength = 128
- pasteEncryptedPasteKeyMaxLength = 256
+ pasteKdfSaltBytes = 16
+ pasteKdfNonceMaxLength = 64
+ pasteKdfMemLimitInteractive = 64 * 1024 * 1024
+ pasteKdfOpsLimitInteractive = 2
+ pasteKdfMemLimitModerate = 256 * 1024 * 1024
+ pasteKdfOpsLimitModerate = 3
+ pasteDecryptionHeaderMaxLength = 128
+ pasteEncryptedPasteKeyMaxLength = 256
pasteEncryptedPasteKeyNonceMaxLength = 128
)
diff --git a/server/pkg/controller/public/paste_test.go b/server/pkg/controller/public/paste_test.go
index 0aa6ff8dbd..60a5b293f1 100644
--- a/server/pkg/controller/public/paste_test.go
+++ b/server/pkg/controller/public/paste_test.go
@@ -36,4 +36,3 @@ func TestIsLikelyPreviewRequest_BlocksWhatsAppBotUA(t *testing.T) {
require.True(t, isLikelyPreviewRequest(ctx))
}
-
diff --git a/server/scripts/lint.sh b/server/scripts/lint.sh
index a7f548637b..695735dcce 100755
--- a/server/scripts/lint.sh
+++ b/server/scripts/lint.sh
@@ -8,5 +8,7 @@
set -o errexit
set -o xtrace
+unformatted="$(gofmt -l .)"
+test -z "$unformatted" || { printf '%s\n' "$unformatted"; exit 1; }
go vet ./...
go run honnef.co/go/tools/cmd/[email protected] ./...