From 909bd5fdec24f8cc00af2a065922ad4b80d52a07 Mon Sep 17 00:00:00 2001 From: Oliver Tonnhofer Date: Tue, 6 Dec 2016 11:00:52 +0100 Subject: [PATCH] rename diff package to update --- cmd/imposm3/main.go | 6 +++--- import_/import.go | 2 +- test/helper_test.go | 4 ++-- {diff => update}/deleter.go | 4 ++-- {diff => update}/doc.go | 2 +- {diff => update}/download/download.go | 2 +- {diff => update}/download/download_test.go | 0 {diff => update}/parser/doc.go | 0 {diff => update}/parser/parser.go | 0 {diff => update}/process.go | 6 +++--- {diff => update}/run.go | 4 ++-- {diff => update}/state/doc.go | 0 {diff => update}/state/state.go | 0 13 files changed, 15 insertions(+), 15 deletions(-) rename {diff => update}/deleter.go (99%) rename {diff => update}/doc.go (84%) rename {diff => update}/download/download.go (99%) rename {diff => update}/download/download_test.go (100%) rename {diff => update}/parser/doc.go (100%) rename {diff => update}/parser/parser.go (100%) rename {diff => update}/process.go (98%) rename {diff => update}/run.go (98%) rename {diff => update}/state/doc.go (100%) rename {diff => update}/state/state.go (100%) diff --git a/cmd/imposm3/main.go b/cmd/imposm3/main.go index 08aef47..1e53110 100644 --- a/cmd/imposm3/main.go +++ b/cmd/imposm3/main.go @@ -9,10 +9,10 @@ import ( "github.com/omniscale/imposm3" "github.com/omniscale/imposm3/cache/query" "github.com/omniscale/imposm3/config" - "github.com/omniscale/imposm3/diff" "github.com/omniscale/imposm3/import_" "github.com/omniscale/imposm3/logging" "github.com/omniscale/imposm3/stats" + "github.com/omniscale/imposm3/update" ) var log = logging.NewLogger("") @@ -52,14 +52,14 @@ func Main(usage func()) { if config.BaseOptions.Httpprofile != "" { stats.StartHttpPProf(config.BaseOptions.Httpprofile) } - diff.Diff() + update.Diff() case "run": config.ParseRunImport(os.Args[2:]) if config.BaseOptions.Httpprofile != "" { stats.StartHttpPProf(config.BaseOptions.Httpprofile) } - diff.Run() + update.Run() case "query-cache": query.Query(os.Args[2:]) case "version": diff --git a/import_/import.go b/import_/import.go index 7138c4f..e866cce 100644 --- a/import_/import.go +++ b/import_/import.go @@ -11,13 +11,13 @@ import ( "github.com/omniscale/imposm3/config" "github.com/omniscale/imposm3/database" _ "github.com/omniscale/imposm3/database/postgis" - state "github.com/omniscale/imposm3/diff/state" "github.com/omniscale/imposm3/geom/limit" "github.com/omniscale/imposm3/logging" "github.com/omniscale/imposm3/mapping" "github.com/omniscale/imposm3/parser/pbf" "github.com/omniscale/imposm3/reader" "github.com/omniscale/imposm3/stats" + "github.com/omniscale/imposm3/update/state" "github.com/omniscale/imposm3/writer" ) diff --git a/test/helper_test.go b/test/helper_test.go index 507aac0..bec6fd6 100644 --- a/test/helper_test.go +++ b/test/helper_test.go @@ -14,8 +14,8 @@ import ( "github.com/lib/pq/hstore" - "github.com/omniscale/imposm3/diff" "github.com/omniscale/imposm3/geom/geos" + "github.com/omniscale/imposm3/update" "github.com/omniscale/imposm3/config" "github.com/omniscale/imposm3/import_" @@ -159,7 +159,7 @@ func (s *importTestSuite) updateOsm(t *testing.T, diffFile string) { } args = append(args, diffFile) config.ParseDiffImport(args) - diff.Diff() + update.Diff() } func (s *importTestSuite) dropSchemas() { diff --git a/diff/deleter.go b/update/deleter.go similarity index 99% rename from diff/deleter.go rename to update/deleter.go index bf8d0a5..d3afa17 100644 --- a/diff/deleter.go +++ b/update/deleter.go @@ -1,12 +1,12 @@ -package diff +package update import ( "github.com/omniscale/imposm3/cache" "github.com/omniscale/imposm3/database" - "github.com/omniscale/imposm3/diff/parser" "github.com/omniscale/imposm3/element" "github.com/omniscale/imposm3/expire" "github.com/omniscale/imposm3/mapping" + "github.com/omniscale/imposm3/update/parser" ) type Deleter struct { diff --git a/diff/doc.go b/update/doc.go similarity index 84% rename from diff/doc.go rename to update/doc.go index 692fb5c..bf4b514 100644 --- a/diff/doc.go +++ b/update/doc.go @@ -1,4 +1,4 @@ /* Package diff provides the diff sub command for updating with diff files. */ -package diff +package update diff --git a/diff/download/download.go b/update/download/download.go similarity index 99% rename from diff/download/download.go rename to update/download/download.go index 652b07f..fc58e48 100644 --- a/diff/download/download.go +++ b/update/download/download.go @@ -13,8 +13,8 @@ import ( "time" "github.com/omniscale/imposm3" - "github.com/omniscale/imposm3/diff/state" "github.com/omniscale/imposm3/logging" + "github.com/omniscale/imposm3/update/state" ) var log = logging.NewLogger("downloader") diff --git a/diff/download/download_test.go b/update/download/download_test.go similarity index 100% rename from diff/download/download_test.go rename to update/download/download_test.go diff --git a/diff/parser/doc.go b/update/parser/doc.go similarity index 100% rename from diff/parser/doc.go rename to update/parser/doc.go diff --git a/diff/parser/parser.go b/update/parser/parser.go similarity index 100% rename from diff/parser/parser.go rename to update/parser/parser.go diff --git a/diff/process.go b/update/process.go similarity index 98% rename from diff/process.go rename to update/process.go index cb57c44..0f0b485 100644 --- a/diff/process.go +++ b/update/process.go @@ -1,4 +1,4 @@ -package diff +package update import ( "errors" @@ -10,8 +10,6 @@ import ( "github.com/omniscale/imposm3/config" "github.com/omniscale/imposm3/database" _ "github.com/omniscale/imposm3/database/postgis" - "github.com/omniscale/imposm3/diff/parser" - diffstate "github.com/omniscale/imposm3/diff/state" "github.com/omniscale/imposm3/element" "github.com/omniscale/imposm3/expire" "github.com/omniscale/imposm3/geom/geos" @@ -19,6 +17,8 @@ import ( "github.com/omniscale/imposm3/logging" "github.com/omniscale/imposm3/mapping" "github.com/omniscale/imposm3/stats" + "github.com/omniscale/imposm3/update/parser" + diffstate "github.com/omniscale/imposm3/update/state" "github.com/omniscale/imposm3/writer" ) diff --git a/diff/run.go b/update/run.go similarity index 98% rename from diff/run.go rename to update/run.go index 15c38e6..4dcc0fa 100644 --- a/diff/run.go +++ b/update/run.go @@ -1,4 +1,4 @@ -package diff +package update import ( "fmt" @@ -9,10 +9,10 @@ import ( "github.com/omniscale/imposm3/cache" "github.com/omniscale/imposm3/config" - "github.com/omniscale/imposm3/diff/download" "github.com/omniscale/imposm3/expire" "github.com/omniscale/imposm3/geom/limit" "github.com/omniscale/imposm3/logging" + "github.com/omniscale/imposm3/update/download" ) var logger = logging.NewLogger("") diff --git a/diff/state/doc.go b/update/state/doc.go similarity index 100% rename from diff/state/doc.go rename to update/state/doc.go diff --git a/diff/state/state.go b/update/state/state.go similarity index 100% rename from diff/state/state.go rename to update/state/state.go