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

Commit 893f3f6

Browse files
authored
chore: Enable gofmt in linter, fix all outstanding errors (#727)
Former-commit-id: 1d9477f Former-commit-id: b22ff27
1 parent ca55e5b commit 893f3f6

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

backend/.golangci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ linters:
5050
- goconst
5151
- gocritic
5252
- gocyclo
53+
- gofmt
5354
- goprintffuncname
5455
- gosimple
5556
- govet

backend/app/api/handlers/v1/v1_ctrl_group.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (ctrl *V1Controller) HandleGroupUpdate() errchain.HandlerFunc {
5757
ok := ctrl.svc.Currencies.IsSupported(body.Currency)
5858
if !ok {
5959
return repo.Group{}, validate.NewFieldErrors(
60-
validate.NewFieldError("currency", "currency '" + body.Currency + "' is not supported"),
60+
validate.NewFieldError("currency", "currency '"+body.Currency+"' is not supported"),
6161
)
6262
}
6363

backend/app/api/handlers/v1/v1_ctrl_items.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
// @Param pageSize query int false "items per page"
2828
// @Param labels query []string false "label Ids" collectionFormat(multi)
2929
// @Param locations query []string false "location Ids" collectionFormat(multi)
30-
// @Param parentIds query []string false "parent Ids" collectionFormat(multi)
30+
// @Param parentIds query []string false "parent Ids" collectionFormat(multi)
3131
// @Success 200 {object} repo.PaginationResult[repo.ItemSummary]{}
3232
// @Router /v1/items [GET]
3333
// @Security Bearer
@@ -57,7 +57,7 @@ func (ctrl *V1Controller) HandleItemsGetAll() errchain.HandlerFunc {
5757
Search: params.Get("q"),
5858
LocationIDs: queryUUIDList(params, "locations"),
5959
LabelIDs: queryUUIDList(params, "labels"),
60-
ParentItemIDs: queryUUIDList(params, "parentIds"),
60+
ParentItemIDs: queryUUIDList(params, "parentIds"),
6161
IncludeArchived: queryBool(params.Get("includeArchived")),
6262
Fields: filterFieldItems(params["fields"]),
6363
OrderBy: params.Get("orderBy"),

backend/internal/sys/config/conf.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ const (
1717

1818
type Config struct {
1919
conf.Version
20-
Mode string `yaml:"mode" conf:"default:development"` // development or production
21-
Web WebConfig `yaml:"web"`
22-
Storage Storage `yaml:"storage"`
23-
Log LoggerConf `yaml:"logger"`
24-
Mailer MailerConf `yaml:"mailer"`
25-
Demo bool `yaml:"demo"`
26-
Debug DebugConf `yaml:"debug"`
27-
Options Options `yaml:"options"`
20+
Mode string `yaml:"mode" conf:"default:development"` // development or production
21+
Web WebConfig `yaml:"web"`
22+
Storage Storage `yaml:"storage"`
23+
Log LoggerConf `yaml:"logger"`
24+
Mailer MailerConf `yaml:"mailer"`
25+
Demo bool `yaml:"demo"`
26+
Debug DebugConf `yaml:"debug"`
27+
Options Options `yaml:"options"`
2828
}
2929

3030
type Options struct {
31-
AllowRegistration bool `yaml:"disable_registration" conf:"default:true"`
32-
AutoIncrementAssetID bool `yaml:"auto_increment_asset_id" conf:"default:true"`
33-
CurrencyConfig string `yaml:"currencies"`
31+
AllowRegistration bool `yaml:"disable_registration" conf:"default:true"`
32+
AutoIncrementAssetID bool `yaml:"auto_increment_asset_id" conf:"default:true"`
33+
CurrencyConfig string `yaml:"currencies"`
3434
}
3535

3636
type DebugConf struct {

0 commit comments

Comments
 (0)