Skip to content

Commit bc1a234

Browse files
committed
fix(#89): silently ignore reflector comments failing
1 parent e3ea4e0 commit bc1a234

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

config.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,7 @@ func NewConfig() *Config {
305305
// Schema returns the JSON schema for the configuration file.
306306
func (conf Config) Schema() ([]byte, error) {
307307
reflector := jsonschema.Reflector{}
308-
if err := reflector.AddGoComments("github.com/ctfer-io/ctfd-setup", "./"); err != nil {
309-
return nil, err
310-
}
308+
_ = reflector.AddGoComments("github.com/ctfer-io/ctfd-setup", "./") // this could fail once binary is compiled, thus ignored (no problem)
311309
r := reflector.Reflect(&Config{})
312310
return json.MarshalIndent(r, "", " ")
313311
}

0 commit comments

Comments
 (0)