From cafb43aa17e0fb24b4c89558c58094806c94eead Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 18 Nov 2019 14:31:52 +0900 Subject: [PATCH] Enabled maligned linter --- .golangci.yml | 1 - arn/Group.go | 4 +++- graphql/graphql.go | 4 ---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index b00a3ce8..06e7ef57 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -13,7 +13,6 @@ linters: - gocyclo - gocognit - gosec - - maligned - stylecheck - funlen - wsl diff --git a/arn/Group.go b/arn/Group.go index 427b18ea..2e3e5c3f 100644 --- a/arn/Group.go +++ b/arn/Group.go @@ -21,7 +21,6 @@ type Group struct { Image Image `json:"image"` Description string `json:"description" editable:"true" type:"textarea"` Rules string `json:"rules" editable:"true" type:"textarea"` - Restricted bool `json:"restricted" editable:"true" tooltip:"Restricted groups can only be joined with the founder's permission."` Tags []string `json:"tags" editable:"true"` Members []*GroupMember `json:"members"` Neighbors []GroupID `json:"neighbors"` @@ -36,6 +35,9 @@ type Group struct { // Mutex membersMutex sync.Mutex + + // Moved this boolean field to the bottom because the structure consumes less bytes that way + Restricted bool `json:"restricted" editable:"true" tooltip:"Restricted groups can only be joined with the founder's permission."` } // Link returns the URI to the group page. diff --git a/graphql/graphql.go b/graphql/graphql.go index a204cffd..df2f289e 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -9,10 +9,6 @@ import ( "github.com/animenotifier/notify.moe/arn" ) -var ( - empty = struct{}{} -) - func Install(app *aero.Application) { api := graphql.New(arn.DB)