code: func (c *ConfigLookup) UnmarshalKey(key string, rawVal interface{}, opts ...UnmarshalOption) error {
  	value, ok := c.Lookup(key)
  	if !ok {
  		return nil
  	}
  
  	//mandatory hook func
  	var unmarshalHooks []mapstructure.DecodeHookFunc
  	unmarshalHooks = append(unmarshalHooks, mapstructure.StringToTimeDurationHookFunc())
  
  	//check for opts
  	unmarshalOptions := unmarshalOpts{}
  	for _, param := range opts {
  		param(&unmarshalOptions)
  	}
  
  	//compose multiple hook funcs to one if found in opts
  	hookFn := mapstructure.ComposeDecodeHookFunc(append(unmarshalHooks, unmarshalOptions.hooks...)...)
  
  	//build decoder
  	decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{
  		DecodeHook: hookFn,
  		Result:     rawVal,
  	})
  	if err != nil {
  		return err
  	}
  
  	//decode
  	return decoder.Decode(value)
  }
docs: //UnmarshalKey unmarshals value for given key to rawval type