func mergeInConfig()

in oss/transport/http.go [78:112]


func mergeInConfig(dst *Config, other *Config) {
	if other == nil {
		return
	}

	if other.ConnectTimeout != nil {
		dst.ConnectTimeout = other.ConnectTimeout
	}

	if other.ReadWriteTimeout != nil {
		dst.ReadWriteTimeout = other.ReadWriteTimeout
	}

	if other.IdleConnectionTimeout != nil {
		dst.IdleConnectionTimeout = other.IdleConnectionTimeout
	}

	if other.KeepAliveTimeout != nil {
		dst.KeepAliveTimeout = other.KeepAliveTimeout
	}

	if other.EnabledRedirect != nil {
		dst.EnabledRedirect = other.EnabledRedirect
	}

	if other.PostRead != nil {
		dst.PostRead = make([]func(n int, err error), len(other.PostRead))
		copy(dst.PostRead, other.PostRead)
	}

	if other.PostWrite != nil {
		dst.PostWrite = make([]func(n int, err error), len(other.PostWrite))
		copy(dst.PostWrite, other.PostWrite)
	}
}