Exemplo n.º 1
0
// GetDateTime returns a date and time object from the manager. Example usage see GetString.
func (m *Manager) GetDateTime(o ...ArgFunc) (time.Time, error) {
	vs := m.get(o...)
	if vs == nil {
		return time.Time{}, ErrKeyNotFound
	}
	return cast.ToTimeE(vs)
}
Exemplo n.º 2
0
// GetDateTime returns a date and time object from the manager. Example usage see GetString.
func (m *Manager) GetDateTime(o ...ArgFunc) time.Time {
	vs := m.get(o...)
	t, err := cast.ToTimeE(vs)
	if err != nil {
		log.Error("config.Manager.GetDateTime.ToTimeE", "err", err, "val", vs)
	}
	return t
}