From 8bfb7a13e3d45bf42d0cdeb0b393d59cc4e385fb Mon Sep 17 00:00:00 2001 From: Kyriacos Date: Wed, 13 May 2020 23:25:01 +0300 Subject: [PATCH] Update godoc --- fig.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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`.