Skip to content

Commit

Permalink
fix(#89): silently ignore reflector comments failing
Browse files Browse the repository at this point in the history
  • Loading branch information
pandatix committed Dec 13, 2024
1 parent e3ea4e0 commit bc1a234
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,7 @@ func NewConfig() *Config {
// Schema returns the JSON schema for the configuration file.
func (conf Config) Schema() ([]byte, error) {
reflector := jsonschema.Reflector{}
if err := reflector.AddGoComments("github.com/ctfer-io/ctfd-setup", "./"); err != nil {
return nil, err
}
_ = reflector.AddGoComments("github.com/ctfer-io/ctfd-setup", "./") // this could fail once binary is compiled, thus ignored (no problem)
r := reflector.Reflect(&Config{})
return json.MarshalIndent(r, "", " ")
}
Expand Down

0 comments on commit bc1a234

Please sign in to comment.