mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-22 00:25:43 +00:00
chore: Enable gofmt in linter, fix all outstanding errors (#727)
Former-commit-id: 1d9477f510bb2d6ada4b720933f113f24c25913e
This commit is contained in:
parent
ca55e5ba94
commit
b22ff272ca
6 changed files with 15 additions and 15 deletions
|
@ -50,6 +50,7 @@ linters:
|
||||||
- goconst
|
- goconst
|
||||||
- gocritic
|
- gocritic
|
||||||
- gocyclo
|
- gocyclo
|
||||||
|
- gofmt
|
||||||
- goprintffuncname
|
- goprintffuncname
|
||||||
- gosimple
|
- gosimple
|
||||||
- govet
|
- govet
|
||||||
|
|
BIN
backend/api
Executable file
BIN
backend/api
Executable file
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
2aa21deab73854398ee7954e2ad3bfb7452bbac0
|
|
|
@ -57,7 +57,7 @@ func (ctrl *V1Controller) HandleGroupUpdate() errchain.HandlerFunc {
|
||||||
ok := ctrl.svc.Currencies.IsSupported(body.Currency)
|
ok := ctrl.svc.Currencies.IsSupported(body.Currency)
|
||||||
if !ok {
|
if !ok {
|
||||||
return repo.Group{}, validate.NewFieldErrors(
|
return repo.Group{}, validate.NewFieldErrors(
|
||||||
validate.NewFieldError("currency", "currency '" + body.Currency + "' is not supported"),
|
validate.NewFieldError("currency", "currency '"+body.Currency+"' is not supported"),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ import (
|
||||||
// @Param pageSize query int false "items per page"
|
// @Param pageSize query int false "items per page"
|
||||||
// @Param labels query []string false "label Ids" collectionFormat(multi)
|
// @Param labels query []string false "label Ids" collectionFormat(multi)
|
||||||
// @Param locations query []string false "location 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]{}
|
// @Success 200 {object} repo.PaginationResult[repo.ItemSummary]{}
|
||||||
// @Router /v1/items [GET]
|
// @Router /v1/items [GET]
|
||||||
// @Security Bearer
|
// @Security Bearer
|
||||||
|
@ -57,7 +57,7 @@ func (ctrl *V1Controller) HandleItemsGetAll() errchain.HandlerFunc {
|
||||||
Search: params.Get("q"),
|
Search: params.Get("q"),
|
||||||
LocationIDs: queryUUIDList(params, "locations"),
|
LocationIDs: queryUUIDList(params, "locations"),
|
||||||
LabelIDs: queryUUIDList(params, "labels"),
|
LabelIDs: queryUUIDList(params, "labels"),
|
||||||
ParentItemIDs: queryUUIDList(params, "parentIds"),
|
ParentItemIDs: queryUUIDList(params, "parentIds"),
|
||||||
IncludeArchived: queryBool(params.Get("includeArchived")),
|
IncludeArchived: queryBool(params.Get("includeArchived")),
|
||||||
Fields: filterFieldItems(params["fields"]),
|
Fields: filterFieldItems(params["fields"]),
|
||||||
OrderBy: params.Get("orderBy"),
|
OrderBy: params.Get("orderBy"),
|
||||||
|
|
|
@ -17,20 +17,20 @@ const (
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
conf.Version
|
conf.Version
|
||||||
Mode string `yaml:"mode" conf:"default:development"` // development or production
|
Mode string `yaml:"mode" conf:"default:development"` // development or production
|
||||||
Web WebConfig `yaml:"web"`
|
Web WebConfig `yaml:"web"`
|
||||||
Storage Storage `yaml:"storage"`
|
Storage Storage `yaml:"storage"`
|
||||||
Log LoggerConf `yaml:"logger"`
|
Log LoggerConf `yaml:"logger"`
|
||||||
Mailer MailerConf `yaml:"mailer"`
|
Mailer MailerConf `yaml:"mailer"`
|
||||||
Demo bool `yaml:"demo"`
|
Demo bool `yaml:"demo"`
|
||||||
Debug DebugConf `yaml:"debug"`
|
Debug DebugConf `yaml:"debug"`
|
||||||
Options Options `yaml:"options"`
|
Options Options `yaml:"options"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
AllowRegistration bool `yaml:"disable_registration" conf:"default:true"`
|
AllowRegistration bool `yaml:"disable_registration" conf:"default:true"`
|
||||||
AutoIncrementAssetID bool `yaml:"auto_increment_asset_id" conf:"default:true"`
|
AutoIncrementAssetID bool `yaml:"auto_increment_asset_id" conf:"default:true"`
|
||||||
CurrencyConfig string `yaml:"currencies"`
|
CurrencyConfig string `yaml:"currencies"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DebugConf struct {
|
type DebugConf struct {
|
||||||
|
|
Loading…
Reference in a new issue