diff --git a/go.mod b/go.mod index 275c0df2..e4a7e537 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/jmhodges/levigo v1.0.1-0.20191214093932-ed89ec741d96 github.com/lib/pq v1.8.0 - github.com/omniscale/go-osm v0.3.0 + github.com/omniscale/go-osm v0.3.1 github.com/pkg/errors v0.9.1 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 683fdb3b..567a1f8d 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/lib/pq v1.8.0 h1:9xohqzkUwzR4Ga4ivdTcawVS89YSDVxXMa3xJX3cGzg= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/omniscale/go-osm v0.3.0 h1:8uq2v5oh6/7w2zOfz3SFFtEFDzHJvLsXaEpl4FqwZ08= github.com/omniscale/go-osm v0.3.0/go.mod h1:4/WtI4s8kMx9SfQH1aua4kJojNOUECMirJx/9F6W53g= +github.com/omniscale/go-osm v0.3.1 h1:C7w7Wno9BpGilI6KgfHoBdoT2s2AVPW7LNTkYOWNKSg= +github.com/omniscale/go-osm v0.3.1/go.mod h1:4/WtI4s8kMx9SfQH1aua4kJojNOUECMirJx/9F6W53g= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/vendor/github.com/omniscale/go-osm/replication/internal/source/source.go b/vendor/github.com/omniscale/go-osm/replication/internal/source/source.go index 871b636b..870bdddd 100644 --- a/vendor/github.com/omniscale/go-osm/replication/internal/source/source.go +++ b/vendor/github.com/omniscale/go-osm/replication/internal/source/source.go @@ -119,13 +119,6 @@ func (d *downloader) download(seq int, ext string) error { return err } - tmpDest := fmt.Sprintf("%s~%d", dest, os.Getpid()) - out, err := os.Create(tmpDest) - if err != nil { - return err - } - defer out.Close() - req, err := http.NewRequest("GET", url, nil) if err != nil { return err @@ -146,6 +139,13 @@ func (d *downloader) download(seq int, ext string) error { return errors.New(fmt.Sprintf("invalid response: %v", resp)) } + tmpDest := fmt.Sprintf("%s~%d", dest, os.Getpid()) + out, err := os.Create(tmpDest) + if err != nil { + return err + } + defer out.Close() + _, err = io.Copy(out, resp.Body) if err != nil { return err diff --git a/vendor/modules.txt b/vendor/modules.txt index 788f83d9..552b9681 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -14,7 +14,7 @@ github.com/lib/pq github.com/lib/pq/hstore github.com/lib/pq/oid github.com/lib/pq/scram -# github.com/omniscale/go-osm v0.3.0 +# github.com/omniscale/go-osm v0.3.1 ## explicit; go 1.21.0 github.com/omniscale/go-osm github.com/omniscale/go-osm/parser/diff