prow/pod-utils/gcs/upload.go
func FileUploadWithMetadata(file string, metadata map[string]string) UploadFunc {
	return func(obj *storage.ObjectHandle) error {
		reader, err := os.Open(file)
		if err != nil {
			return err
		}

		uploadErr := DataUploadWithMetadata(reader, metadata)(obj)
		closeErr := reader.Close()

		return errorutil.NewAggregate(uploadErr, closeErr)
	}
}
func FileUploadWithMetadata(file string, metadata map[string]string) UploadFunc {
	return func(obj *storage.ObjectHandle) error {
		reader, err := os.Open(file)
		if err != nil {
			return err
		}

		uploadErr := DataUploadWithMetadata(reader, metadata)(obj)
		closeErr := reader.Close()

		return errorutil.NewAggregate(uploadErr, closeErr)
	}
}
func FileUploadWithMetadata ( file string , metadata map [ string ] string ) UploadFunc { return func ( obj * storage . ObjectHandle ) error { reader , err := os . Open ( file ) if err != nil { return err } uploadErr := DataUploadWithMetadata ( reader , metadata ) ( obj ) closeErr := reader . Close ( ) return errorutil . NewAggregate ( uploadErr , closeErr ) } }
// FileUploadWithMetadata returns an UploadFunc which copies all
// data from the file on disk into GCS object and also sets the provided
// metadata fields on the object.
FileUploadWithMetadata returns an UploadFunc which copies all data from the file on disk into GCS object and also sets the provided metadata fields on the object .