refactor: Fix linter errors by auto-apply
- Apply automated linter fixes - Manually reformat fields in model/service.go - Resolve code complexity issues
This commit is contained in:
@@ -3,7 +3,7 @@ package args
|
||||
import "git.ostiwe.com/ostiwe-com/status/version"
|
||||
|
||||
type ServerCmd struct {
|
||||
Port string `arg:"-p,--port,env:APP_PORT" help:"Port to listen on" default:"8080"`
|
||||
Port string `arg:"-p,--port,env:APP_PORT" default:"8080" help:"Port to listen on"`
|
||||
}
|
||||
|
||||
type MigrationCreate struct {
|
||||
@@ -15,22 +15,22 @@ type Migration struct {
|
||||
}
|
||||
|
||||
type ServerDocumentationCmd struct {
|
||||
Port string `arg:"-p,--port,env:APP_PORT_DOCS" help:"Port to listen on" default:"8081"`
|
||||
Port string `arg:"-p,--port,env:APP_PORT_DOCS" default:"8081" help:"Port to listen on"`
|
||||
}
|
||||
|
||||
type GenerateDocumentationCmd struct {
|
||||
Format string `arg:"--format,-f" help:"Set output format (json, yaml)" default:"yaml"`
|
||||
Out string `arg:"--out,-o" help:"Output file name (or stdout)" default:"stdout"`
|
||||
Format string `arg:"--format,-f" default:"yaml" help:"Set output format (json, yaml)"`
|
||||
Out string `arg:"--out,-o" default:"stdout" help:"Output file name (or stdout)"`
|
||||
}
|
||||
|
||||
type DocsCmd struct {
|
||||
Serve *ServerDocumentationCmd `arg:"subcommand:serve" help:"Generate and serve the documentation server"`
|
||||
Serve *ServerDocumentationCmd `arg:"subcommand:serve" help:"Generate and serve the documentation server"`
|
||||
Generate *GenerateDocumentationCmd `arg:"subcommand:generate" help:"Generate documentation to file"`
|
||||
}
|
||||
|
||||
type AppArgs struct {
|
||||
Server *ServerCmd `arg:"subcommand:server" help:"Start the api server"`
|
||||
Docs *DocsCmd `arg:"subcommand:docs" help:"Generate documentation to file or run documentation server"`
|
||||
Server *ServerCmd `arg:"subcommand:server" help:"Start the api server"`
|
||||
Docs *DocsCmd `arg:"subcommand:docs" help:"Generate documentation to file or run documentation server"`
|
||||
Migration *Migration `arg:"subcommand:migration" help:"Migration utils"`
|
||||
}
|
||||
|
||||
|
||||
@@ -58,11 +58,13 @@ func (r readyResponseErr) Send(response http.ResponseWriter) error {
|
||||
|
||||
func (r responseErrBuilder) WithTrace(s string) ResponseErrBuilder {
|
||||
r.trace = s
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
func (r responseErrBuilder) WithStatusCode(i int) ResponseErrBuilder {
|
||||
r.status = i
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
@@ -72,11 +74,13 @@ func NewResponseErrBuilder() ResponseErrBuilder {
|
||||
|
||||
func (r responseErrBuilder) WithDetails(m map[string]any) ResponseErrBuilder {
|
||||
r.details = m
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
func (r responseErrBuilder) WithMessage(s string) ResponseErrBuilder {
|
||||
r.message = s
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user