github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/pkg/httputils/util.go (about)

     1  package httputils
     2  
     3  import (
     4  	"context"
     5  	"io"
     6  
     7  	"github.com/kyma-incubator/compass/components/director/pkg/log"
     8  )
     9  
    10  // Close missing godoc
    11  func Close(ctx context.Context, closer io.Closer) {
    12  	if err := closer.Close(); err != nil {
    13  		log.C(ctx).WithError(err).Warnf("Warning: failed to close")
    14  	}
    15  }