func defaultValue(rt reflect.Type) (rv reflect.Value) {
	switch rt.Kind() {
	case reflect.Ptr:
		// Dereference all the way and see if it's a time type.
		rt_:= rt.Elem()
		for rt_.Kind() == reflect.Ptr {
			rt_ = rt_.Elem()
		}
		switch rt_ {
		case timeType:
			// Start from the top and construct pointers as needed.
			rv = reflect.New(rt).Elem()
			rt_, rv_ := rt, rv
			for rt_.Kind() == reflect.Ptr {
				newPtr := reflect.New(rt_.Elem())
				rv_.Set(newPtr)
				rt_ = rt_.Elem()
				rv_ = rv_.Elem()
			}
			// Set to 1970, the whole point of this function.
			rv_.Set(reflect.ValueOf(zeroTime))
			return rv
		}
	case reflect.Struct:
		switch rt {
		case timeType:
			// Set to 1970, the whole point of this function.
			rv = reflect.New(rt).Elem()
			rv.Set(reflect.ValueOf(zeroTime))
			return rv
		}
	}

	// Just return the default Go zero object.
	// Return an empty struct.
	return reflect.Zero(rt)
}
func defaultValue(rt reflect.Type) (rv reflect.Value) {
	switch rt.Kind() {
	case reflect.Ptr:
		
		rt_:= rt.Elem()
		for rt_.Kind() == reflect.Ptr {
			rt_ = rt_.Elem()
		}
		switch rt_ {
		case timeType:
			
			rv = reflect.New(rt).Elem()
			rt_, rv_ := rt, rv
			for rt_.Kind() == reflect.Ptr {
				newPtr := reflect.New(rt_.Elem())
				rv_.Set(newPtr)
				rt_ = rt_.Elem()
				rv_ = rv_.Elem()
			}
			
			rv_.Set(reflect.ValueOf(zeroTime))
			return rv
		}
	case reflect.Struct:
		switch rt {
		case timeType:
			
			rv = reflect.New(rt).Elem()
			rv.Set(reflect.ValueOf(zeroTime))
			return rv
		}
	}

	
	
	return reflect.Zero(rt)
}
func defaultValue ( rt reflect . Type ) ( rv reflect . Value ) { switch rt . Kind ( ) { case reflect . Ptr : // Dereference all the way and see if it's a time type. rt_ := rt . Elem ( ) for rt_ . Kind ( ) == reflect . Ptr { rt_ = rt_ . Elem ( ) } switch rt_ { case timeType : // Start from the top and construct pointers as needed. rv = reflect . New ( rt ) . Elem ( ) rt_ , rv_ := rt , rv for rt_ . Kind ( ) == reflect . Ptr { newPtr := reflect . New ( rt_ . Elem ( ) ) rv_ . Set ( newPtr ) rt_ = rt_ . Elem ( ) rv_ = rv_ . Elem ( ) } // Set to 1970, the whole point of this function. rv_ . Set ( reflect . ValueOf ( zeroTime ) ) return rv } case reflect . Struct : switch rt { case timeType : // Set to 1970, the whole point of this function. rv = reflect . New ( rt ) . Elem ( ) rv . Set ( reflect . ValueOf ( zeroTime ) ) return rv } } // Just return the default Go zero object. // Return an empty struct. return reflect . Zero ( rt ) }
// Returns the default value of a type.  For a time type or a pointer(s) to
// time, the default value is not zero (or nil), but the time value of 1970.
Returns the default value of a type . For a time type or a pointer ( s ) to time the default value is not zero ( or nil ) but the time value of 1970 .