diff --git a/build.go b/build.go index 1ad3933a..fc160369 100644 --- a/build.go +++ b/build.go @@ -233,11 +233,11 @@ func setBuildEnv() { } func assets() { - runPipe("auto/gui.files.go", "godep", "go", "run", "cmd/genassets/main.go", "gui") + runPipe("internal/auto/gui.files.go", "godep", "go", "run", "cmd/genassets/main.go", "gui") } func xdr() { - for _, f := range []string{"discover/packets", "files/leveldb", "protocol/message"} { + for _, f := range []string{"internal/discover/packets", "internal/files/leveldb", "internal/protocol/message"} { runPipe(f+"_xdr.go", "go", "run", "./Godeps/_workspace/src/github.com/calmh/xdr/cmd/genxdr/main.go", "--", f+".go") } } diff --git a/cmd/stindex/main.go b/cmd/stindex/main.go index 29b85a0f..4494b117 100644 --- a/cmd/stindex/main.go +++ b/cmd/stindex/main.go @@ -10,8 +10,8 @@ import ( "log" "os" - "github.com/syncthing/syncthing/files" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/files" + "github.com/syncthing/syncthing/internal/protocol" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index bb3781f5..98c24d26 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -21,13 +21,13 @@ import ( "time" "code.google.com/p/go.crypto/bcrypt" - "github.com/syncthing/syncthing/auto" - "github.com/syncthing/syncthing/config" - "github.com/syncthing/syncthing/events" - "github.com/syncthing/syncthing/logger" - "github.com/syncthing/syncthing/model" - "github.com/syncthing/syncthing/protocol" - "github.com/syncthing/syncthing/upgrade" + "github.com/syncthing/syncthing/internal/auto" + "github.com/syncthing/syncthing/internal/config" + "github.com/syncthing/syncthing/internal/events" + "github.com/syncthing/syncthing/internal/logger" + "github.com/syncthing/syncthing/internal/model" + "github.com/syncthing/syncthing/internal/protocol" + "github.com/syncthing/syncthing/internal/upgrade" "github.com/vitrun/qart/qr" ) diff --git a/cmd/syncthing/gui_auth.go b/cmd/syncthing/gui_auth.go index da9d06a0..a53e8933 100755 --- a/cmd/syncthing/gui_auth.go +++ b/cmd/syncthing/gui_auth.go @@ -14,7 +14,7 @@ import ( "time" "code.google.com/p/go.crypto/bcrypt" - "github.com/syncthing/syncthing/config" + "github.com/syncthing/syncthing/internal/config" ) var ( diff --git a/cmd/syncthing/gui_csrf.go b/cmd/syncthing/gui_csrf.go index f34a0728..0c56660f 100644 --- a/cmd/syncthing/gui_csrf.go +++ b/cmd/syncthing/gui_csrf.go @@ -16,7 +16,7 @@ import ( "sync" "time" - "github.com/syncthing/syncthing/osutil" + "github.com/syncthing/syncthing/internal/osutil" ) var csrfTokens []string diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index cc31b5e8..49dccab2 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -27,15 +27,15 @@ import ( "code.google.com/p/go.crypto/bcrypt" "github.com/juju/ratelimit" - "github.com/syncthing/syncthing/config" - "github.com/syncthing/syncthing/discover" - "github.com/syncthing/syncthing/events" - "github.com/syncthing/syncthing/files" - "github.com/syncthing/syncthing/logger" - "github.com/syncthing/syncthing/model" - "github.com/syncthing/syncthing/protocol" - "github.com/syncthing/syncthing/upgrade" - "github.com/syncthing/syncthing/upnp" + "github.com/syncthing/syncthing/internal/config" + "github.com/syncthing/syncthing/internal/discover" + "github.com/syncthing/syncthing/internal/events" + "github.com/syncthing/syncthing/internal/files" + "github.com/syncthing/syncthing/internal/logger" + "github.com/syncthing/syncthing/internal/model" + "github.com/syncthing/syncthing/internal/protocol" + "github.com/syncthing/syncthing/internal/upgrade" + "github.com/syncthing/syncthing/internal/upnp" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/opt" ) diff --git a/cmd/syncthing/usage_report.go b/cmd/syncthing/usage_report.go index 2feb976f..ec6af7b4 100644 --- a/cmd/syncthing/usage_report.go +++ b/cmd/syncthing/usage_report.go @@ -15,7 +15,7 @@ import ( "strings" "time" - "github.com/syncthing/syncthing/model" + "github.com/syncthing/syncthing/internal/model" ) // Current version number of the usage report, for acceptance purposes. If diff --git a/auto/auto_test.go b/internal/auto/auto_test.go similarity index 91% rename from auto/auto_test.go rename to internal/auto/auto_test.go index 0ff7d8df..7a67c042 100644 --- a/auto/auto_test.go +++ b/internal/auto/auto_test.go @@ -8,7 +8,7 @@ import ( "bytes" "testing" - "github.com/syncthing/syncthing/auto" + "github.com/syncthing/syncthing/internal/auto" ) func TestAssets(t *testing.T) { diff --git a/auto/doc.go b/internal/auto/doc.go similarity index 100% rename from auto/doc.go rename to internal/auto/doc.go diff --git a/auto/gui.files.go b/internal/auto/gui.files.go similarity index 100% rename from auto/gui.files.go rename to internal/auto/gui.files.go diff --git a/beacon/beacon.go b/internal/beacon/beacon.go similarity index 100% rename from beacon/beacon.go rename to internal/beacon/beacon.go diff --git a/beacon/broadcast.go b/internal/beacon/broadcast.go similarity index 100% rename from beacon/broadcast.go rename to internal/beacon/broadcast.go diff --git a/beacon/broadcast_test.go b/internal/beacon/broadcast_test.go similarity index 100% rename from beacon/broadcast_test.go rename to internal/beacon/broadcast_test.go diff --git a/beacon/debug.go b/internal/beacon/debug.go similarity index 88% rename from beacon/debug.go rename to internal/beacon/debug.go index 2f76458a..1b7252f1 100644 --- a/beacon/debug.go +++ b/internal/beacon/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/beacon/doc.go b/internal/beacon/doc.go similarity index 100% rename from beacon/doc.go rename to internal/beacon/doc.go diff --git a/beacon/multicast.go b/internal/beacon/multicast.go similarity index 100% rename from beacon/multicast.go rename to internal/beacon/multicast.go diff --git a/config/config.go b/internal/config/config.go similarity index 98% rename from config/config.go rename to internal/config/config.go index e107a65b..72080f13 100644 --- a/config/config.go +++ b/internal/config/config.go @@ -14,10 +14,10 @@ import ( "strconv" "code.google.com/p/go.crypto/bcrypt" - "github.com/syncthing/syncthing/events" - "github.com/syncthing/syncthing/logger" - "github.com/syncthing/syncthing/osutil" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/events" + "github.com/syncthing/syncthing/internal/logger" + "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/internal/protocol" ) var l = logger.DefaultLogger diff --git a/config/config_test.go b/internal/config/config_test.go similarity index 99% rename from config/config_test.go rename to internal/config/config_test.go index 3d6c63be..3222da48 100644 --- a/config/config_test.go +++ b/internal/config/config_test.go @@ -9,7 +9,7 @@ import ( "reflect" "testing" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/protocol" ) var node1, node2, node3, node4 protocol.NodeID diff --git a/config/testdata/nodeaddressesdynamic.xml b/internal/config/testdata/nodeaddressesdynamic.xml similarity index 100% rename from config/testdata/nodeaddressesdynamic.xml rename to internal/config/testdata/nodeaddressesdynamic.xml diff --git a/config/testdata/nodeaddressesstatic.xml b/internal/config/testdata/nodeaddressesstatic.xml similarity index 100% rename from config/testdata/nodeaddressesstatic.xml rename to internal/config/testdata/nodeaddressesstatic.xml diff --git a/config/testdata/nolistenaddress.xml b/internal/config/testdata/nolistenaddress.xml similarity index 100% rename from config/testdata/nolistenaddress.xml rename to internal/config/testdata/nolistenaddress.xml diff --git a/config/testdata/overridenvalues.xml b/internal/config/testdata/overridenvalues.xml similarity index 100% rename from config/testdata/overridenvalues.xml rename to internal/config/testdata/overridenvalues.xml diff --git a/config/testdata/v1.xml b/internal/config/testdata/v1.xml similarity index 100% rename from config/testdata/v1.xml rename to internal/config/testdata/v1.xml diff --git a/config/testdata/v2.xml b/internal/config/testdata/v2.xml similarity index 100% rename from config/testdata/v2.xml rename to internal/config/testdata/v2.xml diff --git a/config/testdata/v3.xml b/internal/config/testdata/v3.xml similarity index 100% rename from config/testdata/v3.xml rename to internal/config/testdata/v3.xml diff --git a/config/testdata/v4.xml b/internal/config/testdata/v4.xml similarity index 100% rename from config/testdata/v4.xml rename to internal/config/testdata/v4.xml diff --git a/config/testdata/versioningconfig.xml b/internal/config/testdata/versioningconfig.xml similarity index 100% rename from config/testdata/versioningconfig.xml rename to internal/config/testdata/versioningconfig.xml diff --git a/discover/PROTOCOL.md b/internal/discover/PROTOCOL.md similarity index 99% rename from discover/PROTOCOL.md rename to internal/discover/PROTOCOL.md index 7fd1e395..a031fefe 100644 --- a/discover/PROTOCOL.md +++ b/internal/discover/PROTOCOL.md @@ -136,4 +136,3 @@ This is the XDR encoding of: unsigned int MagicNumber; string NodeID<>; } - diff --git a/discover/debug.go b/internal/discover/debug.go similarity index 88% rename from discover/debug.go rename to internal/discover/debug.go index 6368e760..dd83d586 100644 --- a/discover/debug.go +++ b/internal/discover/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/discover/discover.go b/internal/discover/discover.go similarity index 98% rename from discover/discover.go rename to internal/discover/discover.go index d508a7f0..e00cea86 100644 --- a/discover/discover.go +++ b/internal/discover/discover.go @@ -14,9 +14,9 @@ import ( "sync" "time" - "github.com/syncthing/syncthing/beacon" - "github.com/syncthing/syncthing/events" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/beacon" + "github.com/syncthing/syncthing/internal/events" + "github.com/syncthing/syncthing/internal/protocol" ) type Discoverer struct { diff --git a/discover/discover_test.go b/internal/discover/discover_test.go similarity index 100% rename from discover/discover_test.go rename to internal/discover/discover_test.go diff --git a/discover/doc.go b/internal/discover/doc.go similarity index 100% rename from discover/doc.go rename to internal/discover/doc.go diff --git a/discover/packets.go b/internal/discover/packets.go similarity index 100% rename from discover/packets.go rename to internal/discover/packets.go diff --git a/discover/packets_xdr.go b/internal/discover/packets_xdr.go similarity index 100% rename from discover/packets_xdr.go rename to internal/discover/packets_xdr.go diff --git a/events/debug.go b/internal/events/debug.go similarity index 88% rename from events/debug.go rename to internal/events/debug.go index 2eb1e803..a41e2714 100644 --- a/events/debug.go +++ b/internal/events/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/events/events.go b/internal/events/events.go similarity index 100% rename from events/events.go rename to internal/events/events.go diff --git a/events/events_test.go b/internal/events/events_test.go similarity index 98% rename from events/events_test.go rename to internal/events/events_test.go index 70203c39..40617d7a 100644 --- a/events/events_test.go +++ b/internal/events/events_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/syncthing/syncthing/events" + "github.com/syncthing/syncthing/internal/events" ) var timeout = 100 * time.Millisecond diff --git a/files/debug.go b/internal/files/debug.go similarity index 88% rename from files/debug.go rename to internal/files/debug.go index f110dfd8..68f93804 100644 --- a/files/debug.go +++ b/internal/files/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/files/filenames_darwin.go b/internal/files/filenames_darwin.go similarity index 100% rename from files/filenames_darwin.go rename to internal/files/filenames_darwin.go diff --git a/files/filenames_unix.go b/internal/files/filenames_unix.go similarity index 100% rename from files/filenames_unix.go rename to internal/files/filenames_unix.go diff --git a/files/filenames_windows.go b/internal/files/filenames_windows.go similarity index 100% rename from files/filenames_windows.go rename to internal/files/filenames_windows.go diff --git a/files/leveldb.go b/internal/files/leveldb.go similarity index 99% rename from files/leveldb.go rename to internal/files/leveldb.go index 6440e2c2..b551fcba 100644 --- a/files/leveldb.go +++ b/internal/files/leveldb.go @@ -10,8 +10,8 @@ import ( "sort" "sync" - "github.com/syncthing/syncthing/lamport" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/lamport" + "github.com/syncthing/syncthing/internal/protocol" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/opt" @@ -77,8 +77,8 @@ keyTypeNode (1 byte) repository (64 bytes) node (32 bytes) name (variable size) - | - scanner.File + | + scanner.File keyTypeGlobal (1 byte) repository (64 bytes) diff --git a/files/leveldb_xdr.go b/internal/files/leveldb_xdr.go similarity index 100% rename from files/leveldb_xdr.go rename to internal/files/leveldb_xdr.go diff --git a/files/set.go b/internal/files/set.go similarity index 98% rename from files/set.go rename to internal/files/set.go index c70c1919..ba57597e 100644 --- a/files/set.go +++ b/internal/files/set.go @@ -13,8 +13,8 @@ package files import ( "sync" - "github.com/syncthing/syncthing/lamport" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/lamport" + "github.com/syncthing/syncthing/internal/protocol" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/files/set_test.go b/internal/files/set_test.go similarity index 99% rename from files/set_test.go rename to internal/files/set_test.go index 66c458d2..116f70be 100644 --- a/files/set_test.go +++ b/internal/files/set_test.go @@ -11,9 +11,9 @@ import ( "sort" "testing" - "github.com/syncthing/syncthing/files" - "github.com/syncthing/syncthing/lamport" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/files" + "github.com/syncthing/syncthing/internal/lamport" + "github.com/syncthing/syncthing/internal/protocol" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" ) diff --git a/files/testdata/.gitignore b/internal/files/testdata/.gitignore similarity index 100% rename from files/testdata/.gitignore rename to internal/files/testdata/.gitignore diff --git a/fnmatch/fnmatch.go b/internal/fnmatch/fnmatch.go similarity index 100% rename from fnmatch/fnmatch.go rename to internal/fnmatch/fnmatch.go diff --git a/fnmatch/fnmatch_test.go b/internal/fnmatch/fnmatch_test.go similarity index 100% rename from fnmatch/fnmatch_test.go rename to internal/fnmatch/fnmatch_test.go diff --git a/ignore/ignore.go b/internal/ignore/ignore.go similarity index 98% rename from ignore/ignore.go rename to internal/ignore/ignore.go index 86c2ebf6..65c28f56 100644 --- a/ignore/ignore.go +++ b/internal/ignore/ignore.go @@ -13,7 +13,7 @@ import ( "regexp" "strings" - "github.com/syncthing/syncthing/fnmatch" + "github.com/syncthing/syncthing/internal/fnmatch" ) type Pattern struct { diff --git a/ignore/ignore_test.go b/internal/ignore/ignore_test.go similarity index 98% rename from ignore/ignore_test.go rename to internal/ignore/ignore_test.go index 678588bf..14cf5a15 100644 --- a/ignore/ignore_test.go +++ b/internal/ignore/ignore_test.go @@ -10,7 +10,7 @@ import ( "runtime" "testing" - "github.com/syncthing/syncthing/ignore" + "github.com/syncthing/syncthing/internal/ignore" ) func TestIgnore(t *testing.T) { diff --git a/ignore/testdata/.stignore b/internal/ignore/testdata/.stignore similarity index 100% rename from ignore/testdata/.stignore rename to internal/ignore/testdata/.stignore diff --git a/ignore/testdata/dir3/cfile b/internal/ignore/testdata/dir3/cfile similarity index 100% rename from ignore/testdata/dir3/cfile rename to internal/ignore/testdata/dir3/cfile diff --git a/ignore/testdata/dir3/dfile b/internal/ignore/testdata/dir3/dfile similarity index 100% rename from ignore/testdata/dir3/dfile rename to internal/ignore/testdata/dir3/dfile diff --git a/ignore/testdata/excludes b/internal/ignore/testdata/excludes similarity index 100% rename from ignore/testdata/excludes rename to internal/ignore/testdata/excludes diff --git a/ignore/testdata/further-excludes b/internal/ignore/testdata/further-excludes similarity index 100% rename from ignore/testdata/further-excludes rename to internal/ignore/testdata/further-excludes diff --git a/lamport/clock.go b/internal/lamport/clock.go similarity index 100% rename from lamport/clock.go rename to internal/lamport/clock.go diff --git a/lamport/clock_test.go b/internal/lamport/clock_test.go similarity index 100% rename from lamport/clock_test.go rename to internal/lamport/clock_test.go diff --git a/logger/logger.go b/internal/logger/logger.go similarity index 100% rename from logger/logger.go rename to internal/logger/logger.go diff --git a/logger/logger_test.go b/internal/logger/logger_test.go similarity index 100% rename from logger/logger_test.go rename to internal/logger/logger_test.go diff --git a/luhn/luhn.go b/internal/luhn/luhn.go similarity index 100% rename from luhn/luhn.go rename to internal/luhn/luhn.go diff --git a/luhn/luhn_test.go b/internal/luhn/luhn_test.go similarity index 96% rename from luhn/luhn_test.go rename to internal/luhn/luhn_test.go index feb7ad38..fb63691c 100644 --- a/luhn/luhn_test.go +++ b/internal/luhn/luhn_test.go @@ -7,7 +7,7 @@ package luhn_test import ( "testing" - "github.com/syncthing/syncthing/luhn" + "github.com/syncthing/syncthing/internal/luhn" ) func TestGenerate(t *testing.T) { diff --git a/model/blockqueue.go b/internal/model/blockqueue.go similarity index 96% rename from model/blockqueue.go rename to internal/model/blockqueue.go index 6f49ad20..4f3e69fe 100644 --- a/model/blockqueue.go +++ b/internal/model/blockqueue.go @@ -4,7 +4,7 @@ package model -import "github.com/syncthing/syncthing/protocol" +import "github.com/syncthing/syncthing/internal/protocol" type bqAdd struct { file protocol.FileInfo diff --git a/model/debug.go b/internal/model/debug.go similarity index 88% rename from model/debug.go rename to internal/model/debug.go index 754d147b..03a05612 100644 --- a/model/debug.go +++ b/internal/model/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/model/doc.go b/internal/model/doc.go similarity index 100% rename from model/doc.go rename to internal/model/doc.go diff --git a/model/model.go b/internal/model/model.go similarity index 98% rename from model/model.go rename to internal/model/model.go index 3c2103bf..e588059c 100644 --- a/model/model.go +++ b/internal/model/model.go @@ -19,15 +19,15 @@ import ( "sync" "time" - "github.com/syncthing/syncthing/config" - "github.com/syncthing/syncthing/events" - "github.com/syncthing/syncthing/files" - "github.com/syncthing/syncthing/ignore" - "github.com/syncthing/syncthing/lamport" - "github.com/syncthing/syncthing/osutil" - "github.com/syncthing/syncthing/protocol" - "github.com/syncthing/syncthing/scanner" - "github.com/syncthing/syncthing/stats" + "github.com/syncthing/syncthing/internal/config" + "github.com/syncthing/syncthing/internal/events" + "github.com/syncthing/syncthing/internal/files" + "github.com/syncthing/syncthing/internal/ignore" + "github.com/syncthing/syncthing/internal/lamport" + "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/internal/protocol" + "github.com/syncthing/syncthing/internal/scanner" + "github.com/syncthing/syncthing/internal/stats" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/model/model_test.go b/internal/model/model_test.go similarity index 99% rename from model/model_test.go rename to internal/model/model_test.go index 3c044bdf..ed36e544 100644 --- a/model/model_test.go +++ b/internal/model/model_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "github.com/syncthing/syncthing/config" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/config" + "github.com/syncthing/syncthing/internal/protocol" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" ) diff --git a/model/puller.go b/internal/model/puller.go similarity index 98% rename from model/puller.go rename to internal/model/puller.go index a7dee96a..9f1ecf68 100644 --- a/model/puller.go +++ b/internal/model/puller.go @@ -32,12 +32,12 @@ import ( "path/filepath" "time" - "github.com/syncthing/syncthing/config" - "github.com/syncthing/syncthing/events" - "github.com/syncthing/syncthing/osutil" - "github.com/syncthing/syncthing/protocol" - "github.com/syncthing/syncthing/scanner" - "github.com/syncthing/syncthing/versioner" + "github.com/syncthing/syncthing/internal/config" + "github.com/syncthing/syncthing/internal/events" + "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/internal/protocol" + "github.com/syncthing/syncthing/internal/scanner" + "github.com/syncthing/syncthing/internal/versioner" ) type requestResult struct { diff --git a/model/tempname.go b/internal/model/tempname.go similarity index 100% rename from model/tempname.go rename to internal/model/tempname.go diff --git a/model/tempname_windows.go b/internal/model/tempname_windows.go similarity index 100% rename from model/tempname_windows.go rename to internal/model/tempname_windows.go diff --git a/model/testdata/.stignore b/internal/model/testdata/.stignore similarity index 100% rename from model/testdata/.stignore rename to internal/model/testdata/.stignore diff --git a/model/testdata/bar b/internal/model/testdata/bar similarity index 100% rename from model/testdata/bar rename to internal/model/testdata/bar diff --git a/model/testdata/baz/quux b/internal/model/testdata/baz/quux similarity index 100% rename from model/testdata/baz/quux rename to internal/model/testdata/baz/quux diff --git a/model/testdata/empty b/internal/model/testdata/empty similarity index 100% rename from model/testdata/empty rename to internal/model/testdata/empty diff --git a/model/testdata/foo b/internal/model/testdata/foo similarity index 100% rename from model/testdata/foo rename to internal/model/testdata/foo diff --git a/model/util.go b/internal/model/util.go similarity index 100% rename from model/util.go rename to internal/model/util.go diff --git a/osutil/hidden_unix.go b/internal/osutil/hidden_unix.go similarity index 100% rename from osutil/hidden_unix.go rename to internal/osutil/hidden_unix.go diff --git a/osutil/hidden_windows.go b/internal/osutil/hidden_windows.go similarity index 100% rename from osutil/hidden_windows.go rename to internal/osutil/hidden_windows.go diff --git a/osutil/osutil.go b/internal/osutil/osutil.go similarity index 100% rename from osutil/osutil.go rename to internal/osutil/osutil.go diff --git a/osutil/osutil_test.go b/internal/osutil/osutil_test.go similarity index 100% rename from osutil/osutil_test.go rename to internal/osutil/osutil_test.go diff --git a/protocol/.gitignore b/internal/protocol/.gitignore similarity index 100% rename from protocol/.gitignore rename to internal/protocol/.gitignore diff --git a/protocol/common_test.go b/internal/protocol/common_test.go similarity index 100% rename from protocol/common_test.go rename to internal/protocol/common_test.go diff --git a/protocol/counting.go b/internal/protocol/counting.go similarity index 100% rename from protocol/counting.go rename to internal/protocol/counting.go diff --git a/protocol/debug.go b/internal/protocol/debug.go similarity index 88% rename from protocol/debug.go rename to internal/protocol/debug.go index 4097d337..6c586b90 100644 --- a/protocol/debug.go +++ b/internal/protocol/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/protocol/doc.go b/internal/protocol/doc.go similarity index 100% rename from protocol/doc.go rename to internal/protocol/doc.go diff --git a/protocol/header.go b/internal/protocol/header.go similarity index 100% rename from protocol/header.go rename to internal/protocol/header.go diff --git a/protocol/message.go b/internal/protocol/message.go similarity index 100% rename from protocol/message.go rename to internal/protocol/message.go diff --git a/protocol/message_xdr.go b/internal/protocol/message_xdr.go similarity index 100% rename from protocol/message_xdr.go rename to internal/protocol/message_xdr.go diff --git a/protocol/nativemodel_darwin.go b/internal/protocol/nativemodel_darwin.go similarity index 100% rename from protocol/nativemodel_darwin.go rename to internal/protocol/nativemodel_darwin.go diff --git a/protocol/nativemodel_unix.go b/internal/protocol/nativemodel_unix.go similarity index 100% rename from protocol/nativemodel_unix.go rename to internal/protocol/nativemodel_unix.go diff --git a/protocol/nativemodel_windows.go b/internal/protocol/nativemodel_windows.go similarity index 100% rename from protocol/nativemodel_windows.go rename to internal/protocol/nativemodel_windows.go diff --git a/protocol/nodeid.go b/internal/protocol/nodeid.go similarity index 98% rename from protocol/nodeid.go rename to internal/protocol/nodeid.go index b3151d40..9079781b 100644 --- a/protocol/nodeid.go +++ b/internal/protocol/nodeid.go @@ -13,7 +13,7 @@ import ( "regexp" "strings" - "github.com/syncthing/syncthing/luhn" + "github.com/syncthing/syncthing/internal/luhn" ) type NodeID [32]byte diff --git a/protocol/nodeid_test.go b/internal/protocol/nodeid_test.go similarity index 100% rename from protocol/nodeid_test.go rename to internal/protocol/nodeid_test.go diff --git a/protocol/protocol.go b/internal/protocol/protocol.go similarity index 100% rename from protocol/protocol.go rename to internal/protocol/protocol.go diff --git a/protocol/protocol_test.go b/internal/protocol/protocol_test.go similarity index 100% rename from protocol/protocol_test.go rename to internal/protocol/protocol_test.go diff --git a/protocol/wireformat.go b/internal/protocol/wireformat.go similarity index 100% rename from protocol/wireformat.go rename to internal/protocol/wireformat.go diff --git a/scanner/blockqueue.go b/internal/scanner/blockqueue.go similarity index 96% rename from scanner/blockqueue.go rename to internal/scanner/blockqueue.go index c9c29462..02e26cfa 100644 --- a/scanner/blockqueue.go +++ b/internal/scanner/blockqueue.go @@ -9,7 +9,7 @@ import ( "path/filepath" "sync" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/protocol" ) // The parallell hasher reads FileInfo structures from the inbox, hashes the diff --git a/scanner/blocks.go b/internal/scanner/blocks.go similarity index 97% rename from scanner/blocks.go rename to internal/scanner/blocks.go index 8e24247e..9400e10e 100644 --- a/scanner/blocks.go +++ b/internal/scanner/blocks.go @@ -9,7 +9,7 @@ import ( "crypto/sha256" "io" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/protocol" ) const StandardBlockSize = 128 * 1024 diff --git a/scanner/blocks_test.go b/internal/scanner/blocks_test.go similarity index 98% rename from scanner/blocks_test.go rename to internal/scanner/blocks_test.go index d3a89ad4..f80f8a10 100644 --- a/scanner/blocks_test.go +++ b/internal/scanner/blocks_test.go @@ -9,7 +9,7 @@ import ( "fmt" "testing" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/protocol" ) var blocksTestData = []struct { diff --git a/scanner/debug.go b/internal/scanner/debug.go similarity index 88% rename from scanner/debug.go rename to internal/scanner/debug.go index ee2c5716..9e2430b0 100644 --- a/scanner/debug.go +++ b/internal/scanner/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/scanner/doc.go b/internal/scanner/doc.go similarity index 100% rename from scanner/doc.go rename to internal/scanner/doc.go diff --git a/scanner/testdata/.stignore b/internal/scanner/testdata/.stignore similarity index 97% rename from scanner/testdata/.stignore rename to internal/scanner/testdata/.stignore index 8d7a8ade..f9656bfd 100644 --- a/scanner/testdata/.stignore +++ b/internal/scanner/testdata/.stignore @@ -2,4 +2,3 @@ bfile dir1/cfile - diff --git a/scanner/testdata/afile b/internal/scanner/testdata/afile similarity index 100% rename from scanner/testdata/afile rename to internal/scanner/testdata/afile diff --git a/scanner/testdata/bfile b/internal/scanner/testdata/bfile similarity index 100% rename from scanner/testdata/bfile rename to internal/scanner/testdata/bfile diff --git a/scanner/testdata/dir1/cfile b/internal/scanner/testdata/dir1/cfile similarity index 100% rename from scanner/testdata/dir1/cfile rename to internal/scanner/testdata/dir1/cfile diff --git a/scanner/testdata/dir1/dfile b/internal/scanner/testdata/dir1/dfile similarity index 100% rename from scanner/testdata/dir1/dfile rename to internal/scanner/testdata/dir1/dfile diff --git a/scanner/testdata/dir2/cfile b/internal/scanner/testdata/dir2/cfile similarity index 100% rename from scanner/testdata/dir2/cfile rename to internal/scanner/testdata/dir2/cfile diff --git a/scanner/testdata/dir2/dfile b/internal/scanner/testdata/dir2/dfile similarity index 100% rename from scanner/testdata/dir2/dfile rename to internal/scanner/testdata/dir2/dfile diff --git a/scanner/testdata/dir3/cfile b/internal/scanner/testdata/dir3/cfile similarity index 100% rename from scanner/testdata/dir3/cfile rename to internal/scanner/testdata/dir3/cfile diff --git a/scanner/testdata/dir3/dfile b/internal/scanner/testdata/dir3/dfile similarity index 100% rename from scanner/testdata/dir3/dfile rename to internal/scanner/testdata/dir3/dfile diff --git a/scanner/testdata/excludes b/internal/scanner/testdata/excludes similarity index 100% rename from scanner/testdata/excludes rename to internal/scanner/testdata/excludes diff --git a/scanner/testdata/further-excludes b/internal/scanner/testdata/further-excludes similarity index 100% rename from scanner/testdata/further-excludes rename to internal/scanner/testdata/further-excludes diff --git a/scanner/walk.go b/internal/scanner/walk.go similarity index 97% rename from scanner/walk.go rename to internal/scanner/walk.go index 49fc9078..d8717aed 100644 --- a/scanner/walk.go +++ b/internal/scanner/walk.go @@ -12,9 +12,9 @@ import ( "code.google.com/p/go.text/unicode/norm" - "github.com/syncthing/syncthing/ignore" - "github.com/syncthing/syncthing/lamport" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/ignore" + "github.com/syncthing/syncthing/internal/lamport" + "github.com/syncthing/syncthing/internal/protocol" ) type Walker struct { diff --git a/scanner/walk_test.go b/internal/scanner/walk_test.go similarity index 97% rename from scanner/walk_test.go rename to internal/scanner/walk_test.go index cb996094..6a15e989 100644 --- a/scanner/walk_test.go +++ b/internal/scanner/walk_test.go @@ -13,8 +13,8 @@ import ( "sort" "testing" - "github.com/syncthing/syncthing/ignore" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/ignore" + "github.com/syncthing/syncthing/internal/protocol" ) type testfile struct { diff --git a/stats/debug.go b/internal/stats/debug.go similarity index 88% rename from stats/debug.go rename to internal/stats/debug.go index ed5e3db9..90c2c4e8 100755 --- a/stats/debug.go +++ b/internal/stats/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/stats/leveldb.go b/internal/stats/leveldb.go similarity index 100% rename from stats/leveldb.go rename to internal/stats/leveldb.go diff --git a/stats/node.go b/internal/stats/node.go similarity index 97% rename from stats/node.go rename to internal/stats/node.go index 053fa449..d937adf9 100755 --- a/stats/node.go +++ b/internal/stats/node.go @@ -7,7 +7,7 @@ package stats import ( "time" - "github.com/syncthing/syncthing/protocol" + "github.com/syncthing/syncthing/internal/protocol" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/upgrade/debug.go b/internal/upgrade/debug.go similarity index 88% rename from upgrade/debug.go rename to internal/upgrade/debug.go index 552993da..ceca1b7a 100644 --- a/upgrade/debug.go +++ b/internal/upgrade/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/upgrade/upgrade_common.go b/internal/upgrade/upgrade_common.go similarity index 100% rename from upgrade/upgrade_common.go rename to internal/upgrade/upgrade_common.go diff --git a/upgrade/upgrade_supported.go b/internal/upgrade/upgrade_supported.go similarity index 100% rename from upgrade/upgrade_supported.go rename to internal/upgrade/upgrade_supported.go diff --git a/upgrade/upgrade_test.go b/internal/upgrade/upgrade_test.go similarity index 100% rename from upgrade/upgrade_test.go rename to internal/upgrade/upgrade_test.go diff --git a/upgrade/upgrade_unsupp.go b/internal/upgrade/upgrade_unsupp.go similarity index 100% rename from upgrade/upgrade_unsupp.go rename to internal/upgrade/upgrade_unsupp.go diff --git a/upgrade/upgrade_windows.go b/internal/upgrade/upgrade_windows.go similarity index 95% rename from upgrade/upgrade_windows.go rename to internal/upgrade/upgrade_windows.go index 105aeacd..3a4c3876 100755 --- a/upgrade/upgrade_windows.go +++ b/internal/upgrade/upgrade_windows.go @@ -1,166 +1,166 @@ -// Copyright (C) 2014 Jakob Borg and Contributors (see the CONTRIBUTORS file). -// All rights reserved. Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -// +build windows,!noupgrade - -package upgrade - -import ( - "archive/zip" - "bytes" - "encoding/json" - "fmt" - "io" - "io/ioutil" - "net/http" - "os" - "path" - "path/filepath" - "runtime" - "strings" - - "bitbucket.org/kardianos/osext" -) - -// Upgrade to the given release, saving the previous binary with a ".old" extension. -func UpgradeTo(rel Release, archExtra string) error { - path, err := osext.Executable() - if err != nil { - return err - } - - expectedRelease := fmt.Sprintf("syncthing-%s-%s%s-%s.", runtime.GOOS, runtime.GOARCH, archExtra, rel.Tag) - if debug { - l.Debugf("expected release asset %q", expectedRelease) - } - for _, asset := range rel.Assets { - if debug { - l.Debugln("considering release", asset) - } - if strings.HasPrefix(asset.Name, expectedRelease) { - if strings.HasSuffix(asset.Name, ".zip") { - fname, err := readZip(asset.URL, filepath.Dir(path)) - if err != nil { - return err - } - - old := path + ".old" - - os.Remove(old) - err = os.Rename(path, old) - if err != nil { - return err - } - err = os.Rename(fname, path) - if err != nil { - return err - } - return nil - } - } - } - - return ErrVersionUnknown -} - -// Returns the latest release, including prereleases or not depending on the argument -func LatestRelease(prerelease bool) (Release, error) { - resp, err := http.Get("https://api.github.com/repos/syncthing/syncthing/releases?per_page=10") - if err != nil { - return Release{}, err - } - if resp.StatusCode > 299 { - return Release{}, fmt.Errorf("API call returned HTTP error: %s", resp.Status) - } - - var rels []Release - json.NewDecoder(resp.Body).Decode(&rels) - resp.Body.Close() - - if len(rels) == 0 { - return Release{}, ErrVersionUnknown - } - - if prerelease { - // We are a beta version. Use the latest. - return rels[0], nil - } else { - // We are a regular release. Only consider non-prerelease versions for upgrade. - for _, rel := range rels { - if !rel.Prerelease { - return rel, nil - } - } - return Release{}, ErrVersionUnknown - } -} - -func readZip(url, dir string) (string, error) { - if debug { - l.Debugf("loading %q", url) - } - - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return "", err - } - - req.Header.Add("Accept", "application/octet-stream") - resp, err := http.DefaultClient.Do(req) - if err != nil { - return "", err - } - defer resp.Body.Close() - - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - return "", err - } - - archive, err := zip.NewReader(bytes.NewReader(body), resp.ContentLength) - if err != nil { - return "", err - } - - // Iterate through the files in the archive. - for _, file := range archive.File { - - if debug { - l.Debugf("considering file %q", file.Name) - } - - if path.Base(file.Name) == "syncthing.exe" { - infile, err := file.Open() - if err != nil { - return "", err - } - - outfile, err := ioutil.TempFile(dir, "syncthing") - if err != nil { - return "", err - } - - _, err = io.Copy(outfile, infile) - if err != nil { - return "", err - } - - err = infile.Close() - if err != nil { - return "", err - } - - err = outfile.Close() - if err != nil { - os.Remove(outfile.Name()) - return "", err - } - - os.Chmod(outfile.Name(), file.Mode()) - return outfile.Name(), nil - } - } - - return "", fmt.Errorf("No upgrade found") -} +// Copyright (C) 2014 Jakob Borg and Contributors (see the CONTRIBUTORS file). +// All rights reserved. Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. + +// +build windows,!noupgrade + +package upgrade + +import ( + "archive/zip" + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "net/http" + "os" + "path" + "path/filepath" + "runtime" + "strings" + + "bitbucket.org/kardianos/osext" +) + +// Upgrade to the given release, saving the previous binary with a ".old" extension. +func UpgradeTo(rel Release, archExtra string) error { + path, err := osext.Executable() + if err != nil { + return err + } + + expectedRelease := fmt.Sprintf("syncthing-%s-%s%s-%s.", runtime.GOOS, runtime.GOARCH, archExtra, rel.Tag) + if debug { + l.Debugf("expected release asset %q", expectedRelease) + } + for _, asset := range rel.Assets { + if debug { + l.Debugln("considering release", asset) + } + if strings.HasPrefix(asset.Name, expectedRelease) { + if strings.HasSuffix(asset.Name, ".zip") { + fname, err := readZip(asset.URL, filepath.Dir(path)) + if err != nil { + return err + } + + old := path + ".old" + + os.Remove(old) + err = os.Rename(path, old) + if err != nil { + return err + } + err = os.Rename(fname, path) + if err != nil { + return err + } + return nil + } + } + } + + return ErrVersionUnknown +} + +// Returns the latest release, including prereleases or not depending on the argument +func LatestRelease(prerelease bool) (Release, error) { + resp, err := http.Get("https://api.github.com/repos/syncthing/syncthing/releases?per_page=10") + if err != nil { + return Release{}, err + } + if resp.StatusCode > 299 { + return Release{}, fmt.Errorf("API call returned HTTP error: %s", resp.Status) + } + + var rels []Release + json.NewDecoder(resp.Body).Decode(&rels) + resp.Body.Close() + + if len(rels) == 0 { + return Release{}, ErrVersionUnknown + } + + if prerelease { + // We are a beta version. Use the latest. + return rels[0], nil + } else { + // We are a regular release. Only consider non-prerelease versions for upgrade. + for _, rel := range rels { + if !rel.Prerelease { + return rel, nil + } + } + return Release{}, ErrVersionUnknown + } +} + +func readZip(url, dir string) (string, error) { + if debug { + l.Debugf("loading %q", url) + } + + req, err := http.NewRequest("GET", url, nil) + if err != nil { + return "", err + } + + req.Header.Add("Accept", "application/octet-stream") + resp, err := http.DefaultClient.Do(req) + if err != nil { + return "", err + } + defer resp.Body.Close() + + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return "", err + } + + archive, err := zip.NewReader(bytes.NewReader(body), resp.ContentLength) + if err != nil { + return "", err + } + + // Iterate through the files in the archive. + for _, file := range archive.File { + + if debug { + l.Debugf("considering file %q", file.Name) + } + + if path.Base(file.Name) == "syncthing.exe" { + infile, err := file.Open() + if err != nil { + return "", err + } + + outfile, err := ioutil.TempFile(dir, "syncthing") + if err != nil { + return "", err + } + + _, err = io.Copy(outfile, infile) + if err != nil { + return "", err + } + + err = infile.Close() + if err != nil { + return "", err + } + + err = outfile.Close() + if err != nil { + os.Remove(outfile.Name()) + return "", err + } + + os.Chmod(outfile.Name(), file.Mode()) + return outfile.Name(), nil + } + } + + return "", fmt.Errorf("No upgrade found") +} diff --git a/upnp/debug.go b/internal/upnp/debug.go similarity index 88% rename from upnp/debug.go rename to internal/upnp/debug.go index c97c2b87..51900476 100644 --- a/upnp/debug.go +++ b/internal/upnp/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/upnp/testdata/technicolor.xml b/internal/upnp/testdata/technicolor.xml similarity index 100% rename from upnp/testdata/technicolor.xml rename to internal/upnp/testdata/technicolor.xml diff --git a/upnp/upnp.go b/internal/upnp/upnp.go similarity index 100% rename from upnp/upnp.go rename to internal/upnp/upnp.go diff --git a/upnp/upnp_test.go b/internal/upnp/upnp_test.go similarity index 100% rename from upnp/upnp_test.go rename to internal/upnp/upnp_test.go diff --git a/versioner/debug.go b/internal/versioner/debug.go similarity index 88% rename from versioner/debug.go rename to internal/versioner/debug.go index 72b97c6a..4f4e77f8 100644 --- a/versioner/debug.go +++ b/internal/versioner/debug.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/logger" + "github.com/syncthing/syncthing/internal/logger" ) var ( diff --git a/versioner/simple.go b/internal/versioner/simple.go similarity index 98% rename from versioner/simple.go rename to internal/versioner/simple.go index 97d77e42..d9ad8ea9 100644 --- a/versioner/simple.go +++ b/internal/versioner/simple.go @@ -10,7 +10,7 @@ import ( "sort" "strconv" - "github.com/syncthing/syncthing/osutil" + "github.com/syncthing/syncthing/internal/osutil" ) func init() { diff --git a/versioner/staggered.go b/internal/versioner/staggered.go similarity index 99% rename from versioner/staggered.go rename to internal/versioner/staggered.go index b9b7a545..d2928b39 100644 --- a/versioner/staggered.go +++ b/internal/versioner/staggered.go @@ -13,7 +13,7 @@ import ( "sync" "time" - "github.com/syncthing/syncthing/osutil" + "github.com/syncthing/syncthing/internal/osutil" ) func init() { diff --git a/versioner/versioner.go b/internal/versioner/versioner.go similarity index 100% rename from versioner/versioner.go rename to internal/versioner/versioner.go diff --git a/versioner/versioner_test.go b/internal/versioner/versioner_test.go similarity index 100% rename from versioner/versioner_test.go rename to internal/versioner/versioner_test.go diff --git a/integration/.gitignore b/test/.gitignore similarity index 100% rename from integration/.gitignore rename to test/.gitignore diff --git a/integration/all.sh b/test/all.sh similarity index 100% rename from integration/all.sh rename to test/all.sh diff --git a/integration/common_test.go b/test/common_test.go similarity index 100% rename from integration/common_test.go rename to test/common_test.go diff --git a/integration/f1/cert.pem b/test/f1/cert.pem similarity index 100% rename from integration/f1/cert.pem rename to test/f1/cert.pem diff --git a/integration/f1/config.xml b/test/f1/config.xml similarity index 100% rename from integration/f1/config.xml rename to test/f1/config.xml diff --git a/integration/f1/https-cert.pem b/test/f1/https-cert.pem similarity index 100% rename from integration/f1/https-cert.pem rename to test/f1/https-cert.pem diff --git a/integration/f1/https-key.pem b/test/f1/https-key.pem similarity index 100% rename from integration/f1/https-key.pem rename to test/f1/https-key.pem diff --git a/integration/f1/key.pem b/test/f1/key.pem similarity index 100% rename from integration/f1/key.pem rename to test/f1/key.pem diff --git a/integration/f2/cert.pem b/test/f2/cert.pem similarity index 100% rename from integration/f2/cert.pem rename to test/f2/cert.pem diff --git a/integration/f2/config.xml b/test/f2/config.xml similarity index 100% rename from integration/f2/config.xml rename to test/f2/config.xml diff --git a/integration/f2/https-cert.pem b/test/f2/https-cert.pem similarity index 100% rename from integration/f2/https-cert.pem rename to test/f2/https-cert.pem diff --git a/integration/f2/https-key.pem b/test/f2/https-key.pem similarity index 100% rename from integration/f2/https-key.pem rename to test/f2/https-key.pem diff --git a/integration/f2/key.pem b/test/f2/key.pem similarity index 100% rename from integration/f2/key.pem rename to test/f2/key.pem diff --git a/integration/genfiles.go b/test/genfiles.go similarity index 100% rename from integration/genfiles.go rename to test/genfiles.go diff --git a/integration/h1/cert.pem b/test/h1/cert.pem similarity index 100% rename from integration/h1/cert.pem rename to test/h1/cert.pem diff --git a/integration/h1/config.xml b/test/h1/config.xml similarity index 100% rename from integration/h1/config.xml rename to test/h1/config.xml diff --git a/integration/h1/https-cert.pem b/test/h1/https-cert.pem similarity index 100% rename from integration/h1/https-cert.pem rename to test/h1/https-cert.pem diff --git a/integration/h1/https-key.pem b/test/h1/https-key.pem similarity index 100% rename from integration/h1/https-key.pem rename to test/h1/https-key.pem diff --git a/integration/h1/key.pem b/test/h1/key.pem similarity index 100% rename from integration/h1/key.pem rename to test/h1/key.pem diff --git a/integration/h2/cert.pem b/test/h2/cert.pem similarity index 100% rename from integration/h2/cert.pem rename to test/h2/cert.pem diff --git a/integration/h2/config.xml b/test/h2/config.xml similarity index 100% rename from integration/h2/config.xml rename to test/h2/config.xml diff --git a/integration/h2/https-cert.pem b/test/h2/https-cert.pem similarity index 100% rename from integration/h2/https-cert.pem rename to test/h2/https-cert.pem diff --git a/integration/h2/https-key.pem b/test/h2/https-key.pem similarity index 100% rename from integration/h2/https-key.pem rename to test/h2/https-key.pem diff --git a/integration/h2/key.pem b/test/h2/key.pem similarity index 100% rename from integration/h2/key.pem rename to test/h2/key.pem diff --git a/integration/h3/cert.pem b/test/h3/cert.pem similarity index 100% rename from integration/h3/cert.pem rename to test/h3/cert.pem diff --git a/integration/h3/config.xml b/test/h3/config.xml similarity index 100% rename from integration/h3/config.xml rename to test/h3/config.xml diff --git a/integration/h3/https-cert.pem b/test/h3/https-cert.pem similarity index 100% rename from integration/h3/https-cert.pem rename to test/h3/https-cert.pem diff --git a/integration/h3/https-key.pem b/test/h3/https-key.pem similarity index 100% rename from integration/h3/https-key.pem rename to test/h3/https-key.pem diff --git a/integration/h3/key.pem b/test/h3/key.pem similarity index 100% rename from integration/h3/key.pem rename to test/h3/key.pem diff --git a/integration/h4/cert.pem b/test/h4/cert.pem similarity index 100% rename from integration/h4/cert.pem rename to test/h4/cert.pem diff --git a/integration/h4/config.xml b/test/h4/config.xml similarity index 100% rename from integration/h4/config.xml rename to test/h4/config.xml diff --git a/integration/h4/https-cert.pem b/test/h4/https-cert.pem similarity index 100% rename from integration/h4/https-cert.pem rename to test/h4/https-cert.pem diff --git a/integration/h4/https-key.pem b/test/h4/https-key.pem similarity index 100% rename from integration/h4/https-key.pem rename to test/h4/https-key.pem diff --git a/integration/h4/key.pem b/test/h4/key.pem similarity index 100% rename from integration/h4/key.pem rename to test/h4/key.pem diff --git a/integration/http.go b/test/http.go similarity index 100% rename from integration/http.go rename to test/http.go diff --git a/integration/httpstress_test.go b/test/httpstress_test.go similarity index 100% rename from integration/httpstress_test.go rename to test/httpstress_test.go diff --git a/integration/json.go b/test/json.go similarity index 100% rename from integration/json.go rename to test/json.go diff --git a/integration/md5r.go b/test/md5r.go similarity index 100% rename from integration/md5r.go rename to test/md5r.go diff --git a/integration/reconnect_test.go b/test/reconnect_test.go similarity index 100% rename from integration/reconnect_test.go rename to test/reconnect_test.go diff --git a/integration/test-delupd.sh b/test/test-delupd.sh similarity index 100% rename from integration/test-delupd.sh rename to test/test-delupd.sh diff --git a/integration/test-folders.sh b/test/test-folders.sh similarity index 100% rename from integration/test-folders.sh rename to test/test-folders.sh diff --git a/integration/test-http.sh b/test/test-http.sh similarity index 100% rename from integration/test-http.sh rename to test/test-http.sh diff --git a/integration/test-merge.sh b/test/test-merge.sh similarity index 100% rename from integration/test-merge.sh rename to test/test-merge.sh