fix config nil error

This commit is contained in:
Jeff
2019-09-23 14:00:56 +08:00
committed by zryfish
parent 3dca9feb0f
commit 468f7eddca
18 changed files with 68 additions and 23 deletions

View File

@@ -40,6 +40,11 @@ func (s *S3Options) Validate() []error {
// ApplyTo overrides options if it's valid, which endpoint is not empty
func (s *S3Options) ApplyTo(options *S3Options) {
if options == nil {
options = s
return
}
if s.Endpoint != "" {
reflectutils.Override(options, s)
}