Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
chore: Enable gofmt in linter, fix all outstanding errors (#727)
Browse files Browse the repository at this point in the history
Former-commit-id: 1d9477f
  • Loading branch information
LINKIWI authored Jan 28, 2024
1 parent ca55e5b commit b22ff27
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions backend/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ linters:
- goconst
- gocritic
- gocyclo
- gofmt
- goprintffuncname
- gosimple
- govet
Expand Down
Binary file added backend/api
Binary file not shown.
1 change: 0 additions & 1 deletion backend/api.REMOVED.git-id

This file was deleted.

2 changes: 1 addition & 1 deletion backend/app/api/handlers/v1/v1_ctrl_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (ctrl *V1Controller) HandleGroupUpdate() errchain.HandlerFunc {
ok := ctrl.svc.Currencies.IsSupported(body.Currency)
if !ok {
return repo.Group{}, validate.NewFieldErrors(
validate.NewFieldError("currency", "currency '" + body.Currency + "' is not supported"),
validate.NewFieldError("currency", "currency '"+body.Currency+"' is not supported"),
)
}

Expand Down
4 changes: 2 additions & 2 deletions backend/app/api/handlers/v1/v1_ctrl_items.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
// @Param pageSize query int false "items per page"
// @Param labels query []string false "label Ids" collectionFormat(multi)
// @Param locations query []string false "location Ids" collectionFormat(multi)
// @Param parentIds query []string false "parent Ids" collectionFormat(multi)
// @Param parentIds query []string false "parent Ids" collectionFormat(multi)
// @Success 200 {object} repo.PaginationResult[repo.ItemSummary]{}
// @Router /v1/items [GET]
// @Security Bearer
Expand Down Expand Up @@ -57,7 +57,7 @@ func (ctrl *V1Controller) HandleItemsGetAll() errchain.HandlerFunc {
Search: params.Get("q"),
LocationIDs: queryUUIDList(params, "locations"),
LabelIDs: queryUUIDList(params, "labels"),
ParentItemIDs: queryUUIDList(params, "parentIds"),
ParentItemIDs: queryUUIDList(params, "parentIds"),
IncludeArchived: queryBool(params.Get("includeArchived")),
Fields: filterFieldItems(params["fields"]),
OrderBy: params.Get("orderBy"),
Expand Down
22 changes: 11 additions & 11 deletions backend/internal/sys/config/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ const (

type Config struct {
conf.Version
Mode string `yaml:"mode" conf:"default:development"` // development or production
Web WebConfig `yaml:"web"`
Storage Storage `yaml:"storage"`
Log LoggerConf `yaml:"logger"`
Mailer MailerConf `yaml:"mailer"`
Demo bool `yaml:"demo"`
Debug DebugConf `yaml:"debug"`
Options Options `yaml:"options"`
Mode string `yaml:"mode" conf:"default:development"` // development or production
Web WebConfig `yaml:"web"`
Storage Storage `yaml:"storage"`
Log LoggerConf `yaml:"logger"`
Mailer MailerConf `yaml:"mailer"`
Demo bool `yaml:"demo"`
Debug DebugConf `yaml:"debug"`
Options Options `yaml:"options"`
}

type Options struct {
AllowRegistration bool `yaml:"disable_registration" conf:"default:true"`
AutoIncrementAssetID bool `yaml:"auto_increment_asset_id" conf:"default:true"`
CurrencyConfig string `yaml:"currencies"`
AllowRegistration bool `yaml:"disable_registration" conf:"default:true"`
AutoIncrementAssetID bool `yaml:"auto_increment_asset_id" conf:"default:true"`
CurrencyConfig string `yaml:"currencies"`
}

type DebugConf struct {
Expand Down

0 comments on commit b22ff27

Please sign in to comment.