diff --git a/fig.go b/fig.go index 0c45a0b..2205572 100644 --- a/fig.go +++ b/fig.go @@ -37,16 +37,16 @@ const ( // A field can be marked as required by adding a `required` key in the field's struct tag. // If a required field is not set by the configuration file an error is returned. // -// type config struct { -// Env string `fig:"env,required"` // or `fig:",required"` +// type Config struct { +// Env string `fig:"env" validate:"required"` // or just `validate:"required"` // } // -// A field can be configured with a default value by adding a `default=value` in the field's -// struct tag. +// A field can be configured with a default value by adding a `default` key in the +// field's struct tag. // If a field is not set by the configuration file then the default value is set. // // type config struct { -// Level string `fig:"level,default=info"` // or `fig:",default=info"` +// Level string `fig:"level" default:"info"` // or just `default:"info"` // } // // A single field may not be marked as both `required` and `default`.