Fixed a few linter hints

This commit is contained in:
2019-06-07 10:03:16 +09:00
parent 0e4f7fe6ec
commit f464e830bf
21 changed files with 52 additions and 29 deletions

View File

@ -189,7 +189,8 @@ func (post *Post) Edit(ctx aero.Context, key string, value reflect.Value, newVal
consumed := false
user := GetUserFromContext(ctx)
// nolint:gocritic (because this should stay a switch statement)
// This should stay a switch statement.
// nolint:gocritic
switch key {
case "ParentID":
var newParent PostParent

View File

@ -21,7 +21,8 @@ func (settings *Settings) Authorize(ctx aero.Context, action string) error {
// Edit updates the settings object.
func (settings *Settings) Edit(ctx aero.Context, key string, value reflect.Value, newValue reflect.Value) (bool, error) {
// nolint:gocritic (because this should stay as a switch statement)
// This should stay as a switch statement.
// nolint:gocritic
switch key {
case "Theme":
if settings.User().IsPro() {