Skip to content

Commit

Permalink
fix: temporarily disable dirpath for App.Directory
Browse files Browse the repository at this point in the history
As GoValidator incorrectly checks for a directory existence.
See go-playground/validator#1212
  • Loading branch information
jozefcipa committed May 22, 2024
1 parent 1519d01 commit a12bcaa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/novus/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ const (
)

type AppState struct {
Directory string `json:"directory" validate:"required,dirpath"`
// temporarily disabled as the GoValidator incorrectly evaluates the existence of a directory with "dirpath"
// If user deletes the directory Novus will complain about non-existing directory even though it should
// only validate the path format, no the existence (sigh)
// Directory string `json:"directory" validate:"required,dirpath"`
Directory string `json:"directory" validate:"required"`
Status AppStatus `json:"appStatus" validate:"required"`
SSLCertificates shared.DomainCertificates `json:"sslCertificates"`
Routes []shared.Route `json:"routes" validate:"required,dive"`
Expand Down

0 comments on commit a12bcaa

Please sign in to comment.