code: func (c *Config) Bind(flags *pflag.FlagSet, cfg interface{}) (*viper.Viper, error) {
  	v, err := c.NewSubViper(flags, cfg)
  	if err != nil {
  		return v, err
  	}
  
  	if err := UnmarshalAppConfig(cfg, v); err != nil {
  		return v, err
  	}
  
  	val := reflect.Indirect(reflect.ValueOf(cfg))
  
  	// Check if there's a DBConfig object in the cfg struct.
  	// If found, then validate all fields on it are set appropriately.
  	for i := 0; i < val.NumField(); i++ {
  		dbCfg, ok := val.Field(i).Interface().(DBConfig)
  		if !ok {
  			continue
  		}
  		if err := ValidateDBConfig(dbCfg); err != nil {
  			return v, err
  		}
  		break
  	}
  
  	return v, nil
  }
docs: // Bind your passed in config flags to a new viper
  // instance, retrieves the active environment section of your config file using
  // that viper instance, and then loads your server and db config into
  // the passed in cfg struct and validates the db config is set appropriately.