From 7705a6c1f165a9a81856d0c493eac5042b6e18bf Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 6 Aug 2015 11:29:25 +0200 Subject: [PATCH] mv internal lib --- build.go | 12 +++++------ build.sh | 2 +- check-contrib.sh | 2 +- cmd/stcompdirs/main.go | 2 +- cmd/stfileinfo/main.go | 2 +- cmd/stfinddevice/main.go | 2 +- cmd/stindex/main.go | 2 +- cmd/syncthing/audit.go | 2 +- cmd/syncthing/auditsvc_test.go | 2 +- cmd/syncthing/connections.go | 6 +++--- cmd/syncthing/gui.go | 18 ++++++++-------- cmd/syncthing/gui_auth.go | 4 ++-- cmd/syncthing/gui_csrf.go | 4 ++-- cmd/syncthing/locations.go | 2 +- cmd/syncthing/main.go | 16 +++++++------- cmd/syncthing/main_test.go | 6 +++--- cmd/syncthing/monitor.go | 4 ++-- cmd/syncthing/summarysvc.go | 6 +++--- cmd/syncthing/upnpsvc.go | 4 ++-- cmd/syncthing/usage_report.go | 4 ++-- cmd/syncthing/verbose.go | 2 +- {internal => lib}/auto/auto_test.go | 2 +- {internal => lib}/auto/doc.go | 0 {internal => lib}/auto/gui.files.go | 0 {internal => lib}/beacon/beacon.go | 0 {internal => lib}/beacon/broadcast.go | 0 {internal => lib}/beacon/broadcast_test.go | 0 {internal => lib}/beacon/debug.go | 0 {internal => lib}/beacon/doc.go | 0 {internal => lib}/beacon/multicast.go | 0 {internal => lib}/config/commit_test.go | 0 {internal => lib}/config/config.go | 2 +- {internal => lib}/config/config_test.go | 0 {internal => lib}/config/debug.go | 0 .../testdata/deviceaddressesdynamic.xml | 0 .../config/testdata/deviceaddressesstatic.xml | 0 .../config/testdata/devicecompression.xml | 0 {internal => lib}/config/testdata/example.xml | 0 .../config/testdata/issue-1262.xml | 0 .../config/testdata/issue-1750.xml | 0 .../config/testdata/largeinterval.xml | 0 .../config/testdata/nolistenaddress.xml | 0 .../config/testdata/overridenvalues.xml | 0 .../config/testdata/pullorder.xml | 0 {internal => lib}/config/testdata/v10.xml | 0 {internal => lib}/config/testdata/v5.xml | 0 {internal => lib}/config/testdata/v6.xml | 0 {internal => lib}/config/testdata/v7.xml | 0 {internal => lib}/config/testdata/v8.xml | 0 {internal => lib}/config/testdata/v9.xml | 0 .../config/testdata/versioningconfig.xml | 0 {internal => lib}/config/wrapper.go | 6 +++--- {internal => lib}/db/.gitignore | 0 {internal => lib}/db/blockmap.go | 6 +++--- {internal => lib}/db/blockmap_test.go | 2 +- {internal => lib}/db/concurrency_test.go | 2 +- {internal => lib}/db/debug.go | 0 {internal => lib}/db/leveldb.go | 2 +- {internal => lib}/db/leveldb_test.go | 0 {internal => lib}/db/leveldb_xdr.go | 0 {internal => lib}/db/namespaced.go | 0 {internal => lib}/db/namespaced_test.go | 0 {internal => lib}/db/set.go | 4 ++-- {internal => lib}/db/set_test.go | 2 +- {internal => lib}/db/testdata/.gitignore | 0 {internal => lib}/db/truncated.go | 0 {internal => lib}/db/virtualmtime.go | 0 {internal => lib}/db/virtualmtime_test.go | 0 {internal => lib}/discover/client.go | 0 {internal => lib}/discover/client_test.go | 2 +- {internal => lib}/discover/client_udp.go | 2 +- {internal => lib}/discover/debug.go | 0 {internal => lib}/discover/discover.go | 6 +++--- {internal => lib}/discover/discover_test.go | 0 {internal => lib}/discover/doc.go | 0 {internal => lib}/discover/packets.go | 0 {internal => lib}/discover/packets_xdr.go | 0 {internal => lib}/events/debug.go | 0 {internal => lib}/events/events.go | 2 +- {internal => lib}/events/events_test.go | 2 +- {internal => lib}/fnmatch/fnmatch.go | 0 {internal => lib}/fnmatch/fnmatch_test.go | 0 {internal => lib}/ignore/cache.go | 0 {internal => lib}/ignore/cache_test.go | 0 {internal => lib}/ignore/ignore.go | 4 ++-- {internal => lib}/ignore/ignore_test.go | 0 {internal => lib}/ignore/testdata/.stignore | 0 {internal => lib}/ignore/testdata/dir3/cfile | 0 {internal => lib}/ignore/testdata/dir3/dfile | 0 {internal => lib}/ignore/testdata/excludes | 0 .../ignore/testdata/further-excludes | 0 {internal => lib}/model/.gitignore | 0 {internal => lib}/model/debug.go | 0 {internal => lib}/model/deviceactivity.go | 2 +- .../model/deviceactivity_test.go | 0 {internal => lib}/model/doc.go | 0 {internal => lib}/model/folderstate.go | 4 ++-- {internal => lib}/model/model.go | 20 +++++++++--------- {internal => lib}/model/model_test.go | 4 ++-- {internal => lib}/model/progressemitter.go | 6 +++--- .../model/progressemitter_test.go | 6 +++--- {internal => lib}/model/queue.go | 2 +- {internal => lib}/model/queue_test.go | 0 {internal => lib}/model/rofolder.go | 2 +- {internal => lib}/model/rwfolder.go | 18 ++++++++-------- {internal => lib}/model/rwfolder_test.go | 4 ++-- {internal => lib}/model/sharedpullerstate.go | 4 ++-- .../model/sharedpullerstate_test.go | 2 +- {internal => lib}/model/tempname.go | 0 {internal => lib}/model/tempname_test.go | 0 {internal => lib}/model/testdata/.stignore | 0 .../model/testdata/.syncthing.file.tmp | Bin {internal => lib}/model/testdata/bar | 0 {internal => lib}/model/testdata/baz/quux | 0 {internal => lib}/model/testdata/empty | 0 {internal => lib}/model/testdata/foo | 0 .../model/testdata/~syncthing~file.tmp | Bin {internal => lib}/model/util.go | 0 {internal => lib}/osutil/atomic.go | 0 {internal => lib}/osutil/atomic_test.go | 0 {internal => lib}/osutil/filenames_darwin.go | 0 {internal => lib}/osutil/filenames_unix.go | 0 {internal => lib}/osutil/filenames_windows.go | 0 {internal => lib}/osutil/glob_unix.go | 0 {internal => lib}/osutil/glob_windows.go | 0 {internal => lib}/osutil/hidden_unix.go | 0 {internal => lib}/osutil/hidden_windows.go | 0 {internal => lib}/osutil/lan_unix.go | 0 {internal => lib}/osutil/lan_windows.go | 0 {internal => lib}/osutil/lstat_broken.go | 0 {internal => lib}/osutil/lstat_ok.go | 0 {internal => lib}/osutil/mkdirall.go | 0 {internal => lib}/osutil/mkdirall_windows.go | 0 {internal => lib}/osutil/osutil.go | 2 +- {internal => lib}/osutil/osutil_test.go | 2 +- {internal => lib}/osutil/replacingwriter.go | 0 .../osutil/replacingwriter_test.go | 0 {internal => lib}/rc/debug.go | 0 {internal => lib}/rc/rc.go | 4 ++-- {internal => lib}/scanner/blockqueue.go | 2 +- {internal => lib}/scanner/blocks.go | 0 {internal => lib}/scanner/blocks_test.go | 0 {internal => lib}/scanner/debug.go | 0 {internal => lib}/scanner/doc.go | 0 {internal => lib}/scanner/testdata/.stignore | 0 {internal => lib}/scanner/testdata/afile | 0 {internal => lib}/scanner/testdata/bfile | 0 {internal => lib}/scanner/testdata/dir1/cfile | 0 {internal => lib}/scanner/testdata/dir1/dfile | 0 {internal => lib}/scanner/testdata/dir2/cfile | 0 {internal => lib}/scanner/testdata/dir2/dfile | 0 {internal => lib}/scanner/testdata/dir3/cfile | 0 {internal => lib}/scanner/testdata/dir3/dfile | 0 {internal => lib}/scanner/testdata/excludes | 0 .../scanner/testdata/further-excludes | 0 {internal => lib}/scanner/walk.go | 8 +++---- {internal => lib}/scanner/walk_test.go | 4 ++-- {internal => lib}/stats/debug.go | 0 {internal => lib}/stats/device.go | 2 +- {internal => lib}/stats/folder.go | 2 +- {internal => lib}/symlinks/symlink_unix.go | 2 +- {internal => lib}/symlinks/symlink_windows.go | 2 +- {internal => lib}/sync/debug.go | 0 {internal => lib}/sync/sync.go | 0 {internal => lib}/sync/sync_test.go | 0 {internal => lib}/upgrade/debug.go | 0 .../upgrade/testdata/github-releases.json | 0 {internal => lib}/upgrade/upgrade_common.go | 0 .../upgrade/upgrade_supported.go | 0 {internal => lib}/upgrade/upgrade_test.go | 0 {internal => lib}/upgrade/upgrade_unsupp.go | 0 {internal => lib}/upnp/debug.go | 0 {internal => lib}/upnp/upnp.go | 2 +- {internal => lib}/upnp/upnp_test.go | 0 {internal => lib}/versioner/.gitignore | 0 {internal => lib}/versioner/debug.go | 0 {internal => lib}/versioner/external.go | 2 +- {internal => lib}/versioner/simple.go | 2 +- {internal => lib}/versioner/staggered.go | 4 ++-- {internal => lib}/versioner/trashcan.go | 2 +- {internal => lib}/versioner/trashcan_test.go | 0 {internal => lib}/versioner/util.go | 0 {internal => lib}/versioner/versioner.go | 0 {internal => lib}/versioner/versioner_test.go | 0 model/testdata/.stfolder | 0 test/cli_test.go | 2 +- test/conflict_test.go | 4 ++-- test/filetype_test.go | 4 ++-- test/http_test.go | 2 +- test/ignore_test.go | 2 +- test/manypeers_test.go | 6 +++--- test/norestart_test.go | 6 +++--- test/override_test.go | 6 +++--- test/scan_test.go | 2 +- test/symlink_test.go | 6 +++--- test/sync_test.go | 4 ++-- test/util.go | 6 +++--- 197 files changed, 158 insertions(+), 158 deletions(-) rename {internal => lib}/auto/auto_test.go (93%) rename {internal => lib}/auto/doc.go (100%) rename {internal => lib}/auto/gui.files.go (100%) rename {internal => lib}/beacon/beacon.go (100%) rename {internal => lib}/beacon/broadcast.go (100%) rename {internal => lib}/beacon/broadcast_test.go (100%) rename {internal => lib}/beacon/debug.go (100%) rename {internal => lib}/beacon/doc.go (100%) rename {internal => lib}/beacon/multicast.go (100%) rename {internal => lib}/config/commit_test.go (100%) rename {internal => lib}/config/config.go (99%) rename {internal => lib}/config/config_test.go (100%) rename {internal => lib}/config/debug.go (100%) rename {internal => lib}/config/testdata/deviceaddressesdynamic.xml (100%) rename {internal => lib}/config/testdata/deviceaddressesstatic.xml (100%) rename {internal => lib}/config/testdata/devicecompression.xml (100%) rename {internal => lib}/config/testdata/example.xml (100%) rename {internal => lib}/config/testdata/issue-1262.xml (100%) rename {internal => lib}/config/testdata/issue-1750.xml (100%) rename {internal => lib}/config/testdata/largeinterval.xml (100%) rename {internal => lib}/config/testdata/nolistenaddress.xml (100%) rename {internal => lib}/config/testdata/overridenvalues.xml (100%) rename {internal => lib}/config/testdata/pullorder.xml (100%) rename {internal => lib}/config/testdata/v10.xml (100%) rename {internal => lib}/config/testdata/v5.xml (100%) rename {internal => lib}/config/testdata/v6.xml (100%) rename {internal => lib}/config/testdata/v7.xml (100%) rename {internal => lib}/config/testdata/v8.xml (100%) rename {internal => lib}/config/testdata/v9.xml (100%) rename {internal => lib}/config/testdata/versioningconfig.xml (100%) rename {internal => lib}/config/wrapper.go (98%) rename {internal => lib}/db/.gitignore (100%) rename {internal => lib}/db/blockmap.go (97%) rename {internal => lib}/db/blockmap_test.go (98%) rename {internal => lib}/db/concurrency_test.go (98%) rename {internal => lib}/db/debug.go (100%) rename {internal => lib}/db/leveldb.go (99%) rename {internal => lib}/db/leveldb_test.go (100%) rename {internal => lib}/db/leveldb_xdr.go (100%) rename {internal => lib}/db/namespaced.go (100%) rename {internal => lib}/db/namespaced_test.go (100%) rename {internal => lib}/db/set.go (98%) rename {internal => lib}/db/set_test.go (99%) rename {internal => lib}/db/testdata/.gitignore (100%) rename {internal => lib}/db/truncated.go (100%) rename {internal => lib}/db/virtualmtime.go (100%) rename {internal => lib}/db/virtualmtime_test.go (100%) rename {internal => lib}/discover/client.go (100%) rename {internal => lib}/discover/client_test.go (98%) rename {internal => lib}/discover/client_udp.go (99%) rename {internal => lib}/discover/debug.go (100%) rename {internal => lib}/discover/discover.go (98%) rename {internal => lib}/discover/discover_test.go (100%) rename {internal => lib}/discover/doc.go (100%) rename {internal => lib}/discover/packets.go (100%) rename {internal => lib}/discover/packets_xdr.go (100%) rename {internal => lib}/events/debug.go (100%) rename {internal => lib}/events/events.go (99%) rename {internal => lib}/events/events_test.go (98%) rename {internal => lib}/fnmatch/fnmatch.go (100%) rename {internal => lib}/fnmatch/fnmatch_test.go (100%) rename {internal => lib}/ignore/cache.go (100%) rename {internal => lib}/ignore/cache_test.go (100%) rename {internal => lib}/ignore/ignore.go (98%) rename {internal => lib}/ignore/ignore_test.go (100%) rename {internal => lib}/ignore/testdata/.stignore (100%) rename {internal => lib}/ignore/testdata/dir3/cfile (100%) rename {internal => lib}/ignore/testdata/dir3/dfile (100%) rename {internal => lib}/ignore/testdata/excludes (100%) rename {internal => lib}/ignore/testdata/further-excludes (100%) rename {internal => lib}/model/.gitignore (100%) rename {internal => lib}/model/debug.go (100%) rename {internal => lib}/model/deviceactivity.go (96%) rename {internal => lib}/model/deviceactivity_test.go (100%) rename {internal => lib}/model/doc.go (100%) rename {internal => lib}/model/folderstate.go (96%) rename {internal => lib}/model/model.go (99%) rename {internal => lib}/model/model_test.go (99%) rename {internal => lib}/model/progressemitter.go (96%) rename {internal => lib}/model/progressemitter_test.go (91%) rename {internal => lib}/model/queue.go (98%) rename {internal => lib}/model/queue_test.go (100%) rename {internal => lib}/model/rofolder.go (98%) rename {internal => lib}/model/rwfolder.go (98%) rename {internal => lib}/model/rwfolder_test.go (99%) rename {internal => lib}/model/sharedpullerstate.go (98%) rename {internal => lib}/model/sharedpullerstate_test.go (97%) rename {internal => lib}/model/tempname.go (100%) rename {internal => lib}/model/tempname_test.go (100%) rename {internal => lib}/model/testdata/.stignore (100%) rename {internal => lib}/model/testdata/.syncthing.file.tmp (100%) rename {internal => lib}/model/testdata/bar (100%) rename {internal => lib}/model/testdata/baz/quux (100%) rename {internal => lib}/model/testdata/empty (100%) rename {internal => lib}/model/testdata/foo (100%) rename {internal => lib}/model/testdata/~syncthing~file.tmp (100%) rename {internal => lib}/model/util.go (100%) rename {internal => lib}/osutil/atomic.go (100%) rename {internal => lib}/osutil/atomic_test.go (100%) rename {internal => lib}/osutil/filenames_darwin.go (100%) rename {internal => lib}/osutil/filenames_unix.go (100%) rename {internal => lib}/osutil/filenames_windows.go (100%) rename {internal => lib}/osutil/glob_unix.go (100%) rename {internal => lib}/osutil/glob_windows.go (100%) rename {internal => lib}/osutil/hidden_unix.go (100%) rename {internal => lib}/osutil/hidden_windows.go (100%) rename {internal => lib}/osutil/lan_unix.go (100%) rename {internal => lib}/osutil/lan_windows.go (100%) rename {internal => lib}/osutil/lstat_broken.go (100%) rename {internal => lib}/osutil/lstat_ok.go (100%) rename {internal => lib}/osutil/mkdirall.go (100%) rename {internal => lib}/osutil/mkdirall_windows.go (100%) rename {internal => lib}/osutil/osutil.go (99%) rename {internal => lib}/osutil/osutil_test.go (98%) rename {internal => lib}/osutil/replacingwriter.go (100%) rename {internal => lib}/osutil/replacingwriter_test.go (100%) rename {internal => lib}/rc/debug.go (100%) rename {internal => lib}/rc/rc.go (99%) rename {internal => lib}/scanner/blockqueue.go (97%) rename {internal => lib}/scanner/blocks.go (100%) rename {internal => lib}/scanner/blocks_test.go (100%) rename {internal => lib}/scanner/debug.go (100%) rename {internal => lib}/scanner/doc.go (100%) rename {internal => lib}/scanner/testdata/.stignore (100%) rename {internal => lib}/scanner/testdata/afile (100%) rename {internal => lib}/scanner/testdata/bfile (100%) rename {internal => lib}/scanner/testdata/dir1/cfile (100%) rename {internal => lib}/scanner/testdata/dir1/dfile (100%) rename {internal => lib}/scanner/testdata/dir2/cfile (100%) rename {internal => lib}/scanner/testdata/dir2/dfile (100%) rename {internal => lib}/scanner/testdata/dir3/cfile (100%) rename {internal => lib}/scanner/testdata/dir3/dfile (100%) rename {internal => lib}/scanner/testdata/excludes (100%) rename {internal => lib}/scanner/testdata/further-excludes (100%) rename {internal => lib}/scanner/walk.go (98%) rename {internal => lib}/scanner/walk_test.go (98%) rename {internal => lib}/stats/debug.go (100%) rename {internal => lib}/stats/device.go (96%) rename {internal => lib}/stats/folder.go (97%) rename {internal => lib}/symlinks/symlink_unix.go (94%) rename {internal => lib}/symlinks/symlink_windows.go (99%) rename {internal => lib}/sync/debug.go (100%) rename {internal => lib}/sync/sync.go (100%) rename {internal => lib}/sync/sync_test.go (100%) rename {internal => lib}/upgrade/debug.go (100%) rename {internal => lib}/upgrade/testdata/github-releases.json (100%) rename {internal => lib}/upgrade/upgrade_common.go (100%) rename {internal => lib}/upgrade/upgrade_supported.go (100%) rename {internal => lib}/upgrade/upgrade_test.go (100%) rename {internal => lib}/upgrade/upgrade_unsupp.go (100%) rename {internal => lib}/upnp/debug.go (100%) rename {internal => lib}/upnp/upnp.go (99%) rename {internal => lib}/upnp/upnp_test.go (100%) rename {internal => lib}/versioner/.gitignore (100%) rename {internal => lib}/versioner/debug.go (100%) rename {internal => lib}/versioner/external.go (97%) rename {internal => lib}/versioner/simple.go (98%) rename {internal => lib}/versioner/staggered.go (98%) rename {internal => lib}/versioner/trashcan.go (98%) rename {internal => lib}/versioner/trashcan_test.go (100%) rename {internal => lib}/versioner/util.go (100%) rename {internal => lib}/versioner/versioner.go (100%) rename {internal => lib}/versioner/versioner_test.go (100%) create mode 100644 model/testdata/.stfolder diff --git a/build.go b/build.go index 241eef7cc..f5c8814ec 100644 --- a/build.go +++ b/build.go @@ -81,9 +81,9 @@ func main() { install("./cmd/...", tags) vet("./cmd/syncthing") - vet("./internal/...") + vet("./lib/...") lint("./cmd/syncthing") - lint("./internal/...") + lint("./lib/...") return } @@ -143,11 +143,11 @@ func main() { case "vet": vet("./cmd/syncthing") - vet("./internal/...") + vet("./lib/...") case "lint": lint("./cmd/syncthing") - lint("./internal/...") + lint("./lib/...") default: log.Fatalf("Unknown command %q", cmd) @@ -405,11 +405,11 @@ func setBuildEnv() { func assets() { setBuildEnv() - runPipe("internal/auto/gui.files.go", "go", "run", "cmd/genassets/main.go", "gui") + runPipe("lib/auto/gui.files.go", "go", "run", "cmd/genassets/main.go", "gui") } func xdr() { - runPrint("go", "generate", "./internal/discover", "./internal/db") + runPrint("go", "generate", "./lib/discover", "./lib/db") } func translate() { diff --git a/build.sh b/build.sh index 2a730e69c..2401476fc 100755 --- a/build.sh +++ b/build.sh @@ -46,7 +46,7 @@ case "${1:-default}" in prerelease) go run build.go transifex - git add -A gui/assets/ internal/auto/ + git add -A gui/assets/ lib/auto/ pushd man ; ./refresh.sh ; popd git add -A man echo diff --git a/check-contrib.sh b/check-contrib.sh index 9715857ed..9bbb00072 100755 --- a/check-contrib.sh +++ b/check-contrib.sh @@ -30,7 +30,7 @@ print-missing-authors() { } print-missing-copyright() { - find . -name \*.go | xargs egrep -L 'Copyright|automatically generated' | grep -v Godeps | grep -v internal/auto/ + find . -name \*.go | xargs egrep -L 'Copyright|automatically generated' | grep -v Godeps | grep -v lib/auto/ } authors=$(print-missing-authors) diff --git a/cmd/stcompdirs/main.go b/cmd/stcompdirs/main.go index ca6665f6f..74ae6c2d1 100644 --- a/cmd/stcompdirs/main.go +++ b/cmd/stcompdirs/main.go @@ -16,7 +16,7 @@ import ( "os" "path/filepath" - "github.com/syncthing/syncthing/internal/symlinks" + "github.com/syncthing/syncthing/lib/symlinks" ) func main() { diff --git a/cmd/stfileinfo/main.go b/cmd/stfileinfo/main.go index 748d935b1..6d5fed042 100644 --- a/cmd/stfileinfo/main.go +++ b/cmd/stfileinfo/main.go @@ -13,7 +13,7 @@ import ( "path/filepath" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/scanner" + "github.com/syncthing/syncthing/lib/scanner" ) func main() { diff --git a/cmd/stfinddevice/main.go b/cmd/stfinddevice/main.go index 509c8bfb1..165c85e71 100644 --- a/cmd/stfinddevice/main.go +++ b/cmd/stfinddevice/main.go @@ -12,7 +12,7 @@ import ( "os" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/discover" + "github.com/syncthing/syncthing/lib/discover" ) func main() { diff --git a/cmd/stindex/main.go b/cmd/stindex/main.go index a1b1b8e82..1b6a5605b 100644 --- a/cmd/stindex/main.go +++ b/cmd/stindex/main.go @@ -14,7 +14,7 @@ import ( "os" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/db" + "github.com/syncthing/syncthing/lib/db" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/opt" ) diff --git a/cmd/syncthing/audit.go b/cmd/syncthing/audit.go index 1bfe0715c..116d09270 100644 --- a/cmd/syncthing/audit.go +++ b/cmd/syncthing/audit.go @@ -10,7 +10,7 @@ import ( "encoding/json" "io" - "github.com/syncthing/syncthing/internal/events" + "github.com/syncthing/syncthing/lib/events" ) // The auditSvc subscribes to events and writes these in JSON format, one diff --git a/cmd/syncthing/auditsvc_test.go b/cmd/syncthing/auditsvc_test.go index 42b853e7a..4f564be9b 100644 --- a/cmd/syncthing/auditsvc_test.go +++ b/cmd/syncthing/auditsvc_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "github.com/syncthing/syncthing/internal/events" + "github.com/syncthing/syncthing/lib/events" ) func TestAuditService(t *testing.T) { diff --git a/cmd/syncthing/connections.go b/cmd/syncthing/connections.go index 9c64e5c74..b0774681e 100644 --- a/cmd/syncthing/connections.go +++ b/cmd/syncthing/connections.go @@ -15,9 +15,9 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/model" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/model" "github.com/thejerf/suture" ) diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index 559acc822..ddee712a1 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -26,15 +26,15 @@ import ( "github.com/calmh/logger" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/auto" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/db" - "github.com/syncthing/syncthing/internal/discover" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/model" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/sync" - "github.com/syncthing/syncthing/internal/upgrade" + "github.com/syncthing/syncthing/lib/auto" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/db" + "github.com/syncthing/syncthing/lib/discover" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/model" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/sync" + "github.com/syncthing/syncthing/lib/upgrade" "github.com/vitrun/qart/qr" "golang.org/x/crypto/bcrypt" ) diff --git a/cmd/syncthing/gui_auth.go b/cmd/syncthing/gui_auth.go index 8d515abe4..c910dbac7 100644 --- a/cmd/syncthing/gui_auth.go +++ b/cmd/syncthing/gui_auth.go @@ -14,8 +14,8 @@ import ( "strings" "time" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/sync" "golang.org/x/crypto/bcrypt" ) diff --git a/cmd/syncthing/gui_csrf.go b/cmd/syncthing/gui_csrf.go index cabaaf210..ccb90b61f 100644 --- a/cmd/syncthing/gui_csrf.go +++ b/cmd/syncthing/gui_csrf.go @@ -13,8 +13,8 @@ import ( "os" "strings" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/sync" ) var csrfTokens []string diff --git a/cmd/syncthing/locations.go b/cmd/syncthing/locations.go index 663bc3ea6..54c6dd86e 100644 --- a/cmd/syncthing/locations.go +++ b/cmd/syncthing/locations.go @@ -13,7 +13,7 @@ import ( "strings" "time" - "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/lib/osutil" ) type locationEnum string diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index d453ffc1f..19591880d 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -28,14 +28,14 @@ import ( "github.com/calmh/logger" "github.com/juju/ratelimit" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/db" - "github.com/syncthing/syncthing/internal/discover" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/model" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/symlinks" - "github.com/syncthing/syncthing/internal/upgrade" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/db" + "github.com/syncthing/syncthing/lib/discover" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/model" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/symlinks" + "github.com/syncthing/syncthing/lib/upgrade" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/opt" diff --git a/cmd/syncthing/main_test.go b/cmd/syncthing/main_test.go index 8805dc3d9..b5b71b950 100644 --- a/cmd/syncthing/main_test.go +++ b/cmd/syncthing/main_test.go @@ -11,9 +11,9 @@ import ( "testing" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/db" - "github.com/syncthing/syncthing/internal/model" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/db" + "github.com/syncthing/syncthing/lib/model" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" diff --git a/cmd/syncthing/monitor.go b/cmd/syncthing/monitor.go index cc99aa19a..680f718eb 100644 --- a/cmd/syncthing/monitor.go +++ b/cmd/syncthing/monitor.go @@ -17,8 +17,8 @@ import ( "syscall" "time" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/sync" ) var ( diff --git a/cmd/syncthing/summarysvc.go b/cmd/syncthing/summarysvc.go index e79e01f92..04fb792fa 100644 --- a/cmd/syncthing/summarysvc.go +++ b/cmd/syncthing/summarysvc.go @@ -9,9 +9,9 @@ package main import ( "time" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/model" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/model" + "github.com/syncthing/syncthing/lib/sync" "github.com/thejerf/suture" ) diff --git a/cmd/syncthing/upnpsvc.go b/cmd/syncthing/upnpsvc.go index ddba9b858..eae813651 100644 --- a/cmd/syncthing/upnpsvc.go +++ b/cmd/syncthing/upnpsvc.go @@ -10,8 +10,8 @@ import ( "fmt" "time" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/upnp" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/upnp" ) // The UPnP service runs a loop for discovery of IGDs (Internet Gateway diff --git a/cmd/syncthing/usage_report.go b/cmd/syncthing/usage_report.go index 87f8d7ba8..3318547b8 100644 --- a/cmd/syncthing/usage_report.go +++ b/cmd/syncthing/usage_report.go @@ -17,8 +17,8 @@ import ( "runtime" "time" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/model" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/model" "github.com/thejerf/suture" ) diff --git a/cmd/syncthing/verbose.go b/cmd/syncthing/verbose.go index 17fb5f0aa..7e985b0af 100644 --- a/cmd/syncthing/verbose.go +++ b/cmd/syncthing/verbose.go @@ -9,7 +9,7 @@ package main import ( "fmt" - "github.com/syncthing/syncthing/internal/events" + "github.com/syncthing/syncthing/lib/events" ) // The verbose logging service subscribes to events and prints these in diff --git a/internal/auto/auto_test.go b/lib/auto/auto_test.go similarity index 93% rename from internal/auto/auto_test.go rename to lib/auto/auto_test.go index 9bd750b26..91ad35388 100644 --- a/internal/auto/auto_test.go +++ b/lib/auto/auto_test.go @@ -12,7 +12,7 @@ import ( "io/ioutil" "testing" - "github.com/syncthing/syncthing/internal/auto" + "github.com/syncthing/syncthing/lib/auto" ) func TestAssets(t *testing.T) { diff --git a/internal/auto/doc.go b/lib/auto/doc.go similarity index 100% rename from internal/auto/doc.go rename to lib/auto/doc.go diff --git a/internal/auto/gui.files.go b/lib/auto/gui.files.go similarity index 100% rename from internal/auto/gui.files.go rename to lib/auto/gui.files.go diff --git a/internal/beacon/beacon.go b/lib/beacon/beacon.go similarity index 100% rename from internal/beacon/beacon.go rename to lib/beacon/beacon.go diff --git a/internal/beacon/broadcast.go b/lib/beacon/broadcast.go similarity index 100% rename from internal/beacon/broadcast.go rename to lib/beacon/broadcast.go diff --git a/internal/beacon/broadcast_test.go b/lib/beacon/broadcast_test.go similarity index 100% rename from internal/beacon/broadcast_test.go rename to lib/beacon/broadcast_test.go diff --git a/internal/beacon/debug.go b/lib/beacon/debug.go similarity index 100% rename from internal/beacon/debug.go rename to lib/beacon/debug.go diff --git a/internal/beacon/doc.go b/lib/beacon/doc.go similarity index 100% rename from internal/beacon/doc.go rename to lib/beacon/doc.go diff --git a/internal/beacon/multicast.go b/lib/beacon/multicast.go similarity index 100% rename from internal/beacon/multicast.go rename to lib/beacon/multicast.go diff --git a/internal/config/commit_test.go b/lib/config/commit_test.go similarity index 100% rename from internal/config/commit_test.go rename to lib/config/commit_test.go diff --git a/internal/config/config.go b/lib/config/config.go similarity index 99% rename from internal/config/config.go rename to lib/config/config.go index 76133a2aa..9eeea1cca 100644 --- a/internal/config/config.go +++ b/lib/config/config.go @@ -20,7 +20,7 @@ import ( "strings" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/lib/osutil" "golang.org/x/crypto/bcrypt" ) diff --git a/internal/config/config_test.go b/lib/config/config_test.go similarity index 100% rename from internal/config/config_test.go rename to lib/config/config_test.go diff --git a/internal/config/debug.go b/lib/config/debug.go similarity index 100% rename from internal/config/debug.go rename to lib/config/debug.go diff --git a/internal/config/testdata/deviceaddressesdynamic.xml b/lib/config/testdata/deviceaddressesdynamic.xml similarity index 100% rename from internal/config/testdata/deviceaddressesdynamic.xml rename to lib/config/testdata/deviceaddressesdynamic.xml diff --git a/internal/config/testdata/deviceaddressesstatic.xml b/lib/config/testdata/deviceaddressesstatic.xml similarity index 100% rename from internal/config/testdata/deviceaddressesstatic.xml rename to lib/config/testdata/deviceaddressesstatic.xml diff --git a/internal/config/testdata/devicecompression.xml b/lib/config/testdata/devicecompression.xml similarity index 100% rename from internal/config/testdata/devicecompression.xml rename to lib/config/testdata/devicecompression.xml diff --git a/internal/config/testdata/example.xml b/lib/config/testdata/example.xml similarity index 100% rename from internal/config/testdata/example.xml rename to lib/config/testdata/example.xml diff --git a/internal/config/testdata/issue-1262.xml b/lib/config/testdata/issue-1262.xml similarity index 100% rename from internal/config/testdata/issue-1262.xml rename to lib/config/testdata/issue-1262.xml diff --git a/internal/config/testdata/issue-1750.xml b/lib/config/testdata/issue-1750.xml similarity index 100% rename from internal/config/testdata/issue-1750.xml rename to lib/config/testdata/issue-1750.xml diff --git a/internal/config/testdata/largeinterval.xml b/lib/config/testdata/largeinterval.xml similarity index 100% rename from internal/config/testdata/largeinterval.xml rename to lib/config/testdata/largeinterval.xml diff --git a/internal/config/testdata/nolistenaddress.xml b/lib/config/testdata/nolistenaddress.xml similarity index 100% rename from internal/config/testdata/nolistenaddress.xml rename to lib/config/testdata/nolistenaddress.xml diff --git a/internal/config/testdata/overridenvalues.xml b/lib/config/testdata/overridenvalues.xml similarity index 100% rename from internal/config/testdata/overridenvalues.xml rename to lib/config/testdata/overridenvalues.xml diff --git a/internal/config/testdata/pullorder.xml b/lib/config/testdata/pullorder.xml similarity index 100% rename from internal/config/testdata/pullorder.xml rename to lib/config/testdata/pullorder.xml diff --git a/internal/config/testdata/v10.xml b/lib/config/testdata/v10.xml similarity index 100% rename from internal/config/testdata/v10.xml rename to lib/config/testdata/v10.xml diff --git a/internal/config/testdata/v5.xml b/lib/config/testdata/v5.xml similarity index 100% rename from internal/config/testdata/v5.xml rename to lib/config/testdata/v5.xml diff --git a/internal/config/testdata/v6.xml b/lib/config/testdata/v6.xml similarity index 100% rename from internal/config/testdata/v6.xml rename to lib/config/testdata/v6.xml diff --git a/internal/config/testdata/v7.xml b/lib/config/testdata/v7.xml similarity index 100% rename from internal/config/testdata/v7.xml rename to lib/config/testdata/v7.xml diff --git a/internal/config/testdata/v8.xml b/lib/config/testdata/v8.xml similarity index 100% rename from internal/config/testdata/v8.xml rename to lib/config/testdata/v8.xml diff --git a/internal/config/testdata/v9.xml b/lib/config/testdata/v9.xml similarity index 100% rename from internal/config/testdata/v9.xml rename to lib/config/testdata/v9.xml diff --git a/internal/config/testdata/versioningconfig.xml b/lib/config/testdata/versioningconfig.xml similarity index 100% rename from internal/config/testdata/versioningconfig.xml rename to lib/config/testdata/versioningconfig.xml diff --git a/internal/config/wrapper.go b/lib/config/wrapper.go similarity index 98% rename from internal/config/wrapper.go rename to lib/config/wrapper.go index aeaf8b7d7..25ea792bf 100644 --- a/internal/config/wrapper.go +++ b/lib/config/wrapper.go @@ -10,9 +10,9 @@ import ( "os" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/sync" ) // The Committer interface is implemented by objects that need to know about diff --git a/internal/db/.gitignore b/lib/db/.gitignore similarity index 100% rename from internal/db/.gitignore rename to lib/db/.gitignore diff --git a/internal/db/blockmap.go b/lib/db/blockmap.go similarity index 97% rename from internal/db/blockmap.go rename to lib/db/blockmap.go index 4846facad..40c40076b 100644 --- a/internal/db/blockmap.go +++ b/lib/db/blockmap.go @@ -19,9 +19,9 @@ import ( "sort" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/sync" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/util" diff --git a/internal/db/blockmap_test.go b/lib/db/blockmap_test.go similarity index 98% rename from internal/db/blockmap_test.go rename to lib/db/blockmap_test.go index 95fe73a0a..e0fdf7c40 100644 --- a/internal/db/blockmap_test.go +++ b/lib/db/blockmap_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" + "github.com/syncthing/syncthing/lib/config" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" diff --git a/internal/db/concurrency_test.go b/lib/db/concurrency_test.go similarity index 98% rename from internal/db/concurrency_test.go rename to lib/db/concurrency_test.go index f2b4c2a28..01792be00 100644 --- a/internal/db/concurrency_test.go +++ b/lib/db/concurrency_test.go @@ -15,7 +15,7 @@ import ( "testing" "time" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/opt" diff --git a/internal/db/debug.go b/lib/db/debug.go similarity index 100% rename from internal/db/debug.go rename to lib/db/debug.go diff --git a/internal/db/leveldb.go b/lib/db/leveldb.go similarity index 99% rename from internal/db/leveldb.go rename to lib/db/leveldb.go index 774bab351..ec64bda2c 100644 --- a/internal/db/leveldb.go +++ b/lib/db/leveldb.go @@ -16,7 +16,7 @@ import ( "sort" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/opt" diff --git a/internal/db/leveldb_test.go b/lib/db/leveldb_test.go similarity index 100% rename from internal/db/leveldb_test.go rename to lib/db/leveldb_test.go diff --git a/internal/db/leveldb_xdr.go b/lib/db/leveldb_xdr.go similarity index 100% rename from internal/db/leveldb_xdr.go rename to lib/db/leveldb_xdr.go diff --git a/internal/db/namespaced.go b/lib/db/namespaced.go similarity index 100% rename from internal/db/namespaced.go rename to lib/db/namespaced.go diff --git a/internal/db/namespaced_test.go b/lib/db/namespaced_test.go similarity index 100% rename from internal/db/namespaced_test.go rename to lib/db/namespaced_test.go diff --git a/internal/db/set.go b/lib/db/set.go similarity index 98% rename from internal/db/set.go rename to lib/db/set.go index a92f41577..8924c958b 100644 --- a/internal/db/set.go +++ b/lib/db/set.go @@ -14,8 +14,8 @@ package db import ( "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/sync" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/internal/db/set_test.go b/lib/db/set_test.go similarity index 99% rename from internal/db/set_test.go rename to lib/db/set_test.go index 3e82bdaac..c4318f5c7 100644 --- a/internal/db/set_test.go +++ b/lib/db/set_test.go @@ -14,7 +14,7 @@ import ( "testing" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/db" + "github.com/syncthing/syncthing/lib/db" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" ) diff --git a/internal/db/testdata/.gitignore b/lib/db/testdata/.gitignore similarity index 100% rename from internal/db/testdata/.gitignore rename to lib/db/testdata/.gitignore diff --git a/internal/db/truncated.go b/lib/db/truncated.go similarity index 100% rename from internal/db/truncated.go rename to lib/db/truncated.go diff --git a/internal/db/virtualmtime.go b/lib/db/virtualmtime.go similarity index 100% rename from internal/db/virtualmtime.go rename to lib/db/virtualmtime.go diff --git a/internal/db/virtualmtime_test.go b/lib/db/virtualmtime_test.go similarity index 100% rename from internal/db/virtualmtime_test.go rename to lib/db/virtualmtime_test.go diff --git a/internal/discover/client.go b/lib/discover/client.go similarity index 100% rename from internal/discover/client.go rename to lib/discover/client.go diff --git a/internal/discover/client_test.go b/lib/discover/client_test.go similarity index 98% rename from internal/discover/client_test.go rename to lib/discover/client_test.go index 5b55c1754..a8271b46a 100644 --- a/internal/discover/client_test.go +++ b/lib/discover/client_test.go @@ -15,7 +15,7 @@ import ( "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" ) var device protocol.DeviceID diff --git a/internal/discover/client_udp.go b/lib/discover/client_udp.go similarity index 99% rename from internal/discover/client_udp.go rename to lib/discover/client_udp.go index a76bfd3bb..2da767810 100644 --- a/internal/discover/client_udp.go +++ b/lib/discover/client_udp.go @@ -15,7 +15,7 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" ) func init() { diff --git a/internal/discover/debug.go b/lib/discover/debug.go similarity index 100% rename from internal/discover/debug.go rename to lib/discover/debug.go diff --git a/internal/discover/discover.go b/lib/discover/discover.go similarity index 98% rename from internal/discover/discover.go rename to lib/discover/discover.go index 30d265da7..87502a4d3 100644 --- a/internal/discover/discover.go +++ b/lib/discover/discover.go @@ -17,9 +17,9 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/beacon" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/beacon" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/sync" ) type Discoverer struct { diff --git a/internal/discover/discover_test.go b/lib/discover/discover_test.go similarity index 100% rename from internal/discover/discover_test.go rename to lib/discover/discover_test.go diff --git a/internal/discover/doc.go b/lib/discover/doc.go similarity index 100% rename from internal/discover/doc.go rename to lib/discover/doc.go diff --git a/internal/discover/packets.go b/lib/discover/packets.go similarity index 100% rename from internal/discover/packets.go rename to lib/discover/packets.go diff --git a/internal/discover/packets_xdr.go b/lib/discover/packets_xdr.go similarity index 100% rename from internal/discover/packets_xdr.go rename to lib/discover/packets_xdr.go diff --git a/internal/events/debug.go b/lib/events/debug.go similarity index 100% rename from internal/events/debug.go rename to lib/events/debug.go diff --git a/internal/events/events.go b/lib/events/events.go similarity index 99% rename from internal/events/events.go rename to lib/events/events.go index 05ef7b8e6..78c1d692f 100644 --- a/internal/events/events.go +++ b/lib/events/events.go @@ -12,7 +12,7 @@ import ( stdsync "sync" "time" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" ) type EventType int diff --git a/internal/events/events_test.go b/lib/events/events_test.go similarity index 98% rename from internal/events/events_test.go rename to lib/events/events_test.go index 7247555c3..982953d94 100644 --- a/internal/events/events_test.go +++ b/lib/events/events_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/syncthing/syncthing/internal/events" + "github.com/syncthing/syncthing/lib/events" ) var timeout = 100 * time.Millisecond diff --git a/internal/fnmatch/fnmatch.go b/lib/fnmatch/fnmatch.go similarity index 100% rename from internal/fnmatch/fnmatch.go rename to lib/fnmatch/fnmatch.go diff --git a/internal/fnmatch/fnmatch_test.go b/lib/fnmatch/fnmatch_test.go similarity index 100% rename from internal/fnmatch/fnmatch_test.go rename to lib/fnmatch/fnmatch_test.go diff --git a/internal/ignore/cache.go b/lib/ignore/cache.go similarity index 100% rename from internal/ignore/cache.go rename to lib/ignore/cache.go diff --git a/internal/ignore/cache_test.go b/lib/ignore/cache_test.go similarity index 100% rename from internal/ignore/cache_test.go rename to lib/ignore/cache_test.go diff --git a/internal/ignore/ignore.go b/lib/ignore/ignore.go similarity index 98% rename from internal/ignore/ignore.go rename to lib/ignore/ignore.go index 70f77c5b1..fc50f9a83 100644 --- a/internal/ignore/ignore.go +++ b/lib/ignore/ignore.go @@ -18,8 +18,8 @@ import ( "strings" "time" - "github.com/syncthing/syncthing/internal/fnmatch" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/fnmatch" + "github.com/syncthing/syncthing/lib/sync" ) type Pattern struct { diff --git a/internal/ignore/ignore_test.go b/lib/ignore/ignore_test.go similarity index 100% rename from internal/ignore/ignore_test.go rename to lib/ignore/ignore_test.go diff --git a/internal/ignore/testdata/.stignore b/lib/ignore/testdata/.stignore similarity index 100% rename from internal/ignore/testdata/.stignore rename to lib/ignore/testdata/.stignore diff --git a/internal/ignore/testdata/dir3/cfile b/lib/ignore/testdata/dir3/cfile similarity index 100% rename from internal/ignore/testdata/dir3/cfile rename to lib/ignore/testdata/dir3/cfile diff --git a/internal/ignore/testdata/dir3/dfile b/lib/ignore/testdata/dir3/dfile similarity index 100% rename from internal/ignore/testdata/dir3/dfile rename to lib/ignore/testdata/dir3/dfile diff --git a/internal/ignore/testdata/excludes b/lib/ignore/testdata/excludes similarity index 100% rename from internal/ignore/testdata/excludes rename to lib/ignore/testdata/excludes diff --git a/internal/ignore/testdata/further-excludes b/lib/ignore/testdata/further-excludes similarity index 100% rename from internal/ignore/testdata/further-excludes rename to lib/ignore/testdata/further-excludes diff --git a/internal/model/.gitignore b/lib/model/.gitignore similarity index 100% rename from internal/model/.gitignore rename to lib/model/.gitignore diff --git a/internal/model/debug.go b/lib/model/debug.go similarity index 100% rename from internal/model/debug.go rename to lib/model/debug.go diff --git a/internal/model/deviceactivity.go b/lib/model/deviceactivity.go similarity index 96% rename from internal/model/deviceactivity.go rename to lib/model/deviceactivity.go index e69620bea..cab14bcee 100644 --- a/internal/model/deviceactivity.go +++ b/lib/model/deviceactivity.go @@ -8,7 +8,7 @@ package model import ( "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" ) // deviceActivity tracks the number of outstanding requests per device and can diff --git a/internal/model/deviceactivity_test.go b/lib/model/deviceactivity_test.go similarity index 100% rename from internal/model/deviceactivity_test.go rename to lib/model/deviceactivity_test.go diff --git a/internal/model/doc.go b/lib/model/doc.go similarity index 100% rename from internal/model/doc.go rename to lib/model/doc.go diff --git a/internal/model/folderstate.go b/lib/model/folderstate.go similarity index 96% rename from internal/model/folderstate.go rename to lib/model/folderstate.go index 98d11cc9f..dfacdc47d 100644 --- a/internal/model/folderstate.go +++ b/lib/model/folderstate.go @@ -9,8 +9,8 @@ package model import ( "time" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/sync" ) type folderState int diff --git a/internal/model/model.go b/lib/model/model.go similarity index 99% rename from internal/model/model.go rename to lib/model/model.go index 0c73ad30f..e8afc16ac 100644 --- a/internal/model/model.go +++ b/lib/model/model.go @@ -23,16 +23,16 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/db" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/ignore" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/scanner" - "github.com/syncthing/syncthing/internal/stats" - "github.com/syncthing/syncthing/internal/symlinks" - "github.com/syncthing/syncthing/internal/sync" - "github.com/syncthing/syncthing/internal/versioner" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/db" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/ignore" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/scanner" + "github.com/syncthing/syncthing/lib/stats" + "github.com/syncthing/syncthing/lib/symlinks" + "github.com/syncthing/syncthing/lib/sync" + "github.com/syncthing/syncthing/lib/versioner" "github.com/syndtr/goleveldb/leveldb" "github.com/thejerf/suture" ) diff --git a/internal/model/model_test.go b/lib/model/model_test.go similarity index 99% rename from internal/model/model_test.go rename to lib/model/model_test.go index 9243cc8ca..724302195 100644 --- a/internal/model/model_test.go +++ b/lib/model/model_test.go @@ -19,8 +19,8 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/db" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/db" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" ) diff --git a/internal/model/progressemitter.go b/lib/model/progressemitter.go similarity index 96% rename from internal/model/progressemitter.go rename to lib/model/progressemitter.go index c38db315f..b7e83b790 100755 --- a/internal/model/progressemitter.go +++ b/lib/model/progressemitter.go @@ -12,9 +12,9 @@ import ( "reflect" "time" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/sync" ) type ProgressEmitter struct { diff --git a/internal/model/progressemitter_test.go b/lib/model/progressemitter_test.go similarity index 91% rename from internal/model/progressemitter_test.go rename to lib/model/progressemitter_test.go index 8c073d40b..cd8bba22d 100644 --- a/internal/model/progressemitter_test.go +++ b/lib/model/progressemitter_test.go @@ -10,9 +10,9 @@ import ( "testing" "time" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/sync" ) var timeout = 10 * time.Millisecond diff --git a/internal/model/queue.go b/lib/model/queue.go similarity index 98% rename from internal/model/queue.go rename to lib/model/queue.go index 51565c8cb..8b247495c 100644 --- a/internal/model/queue.go +++ b/lib/model/queue.go @@ -10,7 +10,7 @@ import ( "math/rand" "sort" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" ) type jobQueue struct { diff --git a/internal/model/queue_test.go b/lib/model/queue_test.go similarity index 100% rename from internal/model/queue_test.go rename to lib/model/queue_test.go diff --git a/internal/model/rofolder.go b/lib/model/rofolder.go similarity index 98% rename from internal/model/rofolder.go rename to lib/model/rofolder.go index e737fee53..9ee4e60e5 100644 --- a/internal/model/rofolder.go +++ b/lib/model/rofolder.go @@ -11,7 +11,7 @@ import ( "math/rand" "time" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" ) type roFolder struct { diff --git a/internal/model/rwfolder.go b/lib/model/rwfolder.go similarity index 98% rename from internal/model/rwfolder.go rename to lib/model/rwfolder.go index 446946f73..af5942a51 100644 --- a/internal/model/rwfolder.go +++ b/lib/model/rwfolder.go @@ -17,15 +17,15 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/db" - "github.com/syncthing/syncthing/internal/events" - "github.com/syncthing/syncthing/internal/ignore" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/scanner" - "github.com/syncthing/syncthing/internal/symlinks" - "github.com/syncthing/syncthing/internal/sync" - "github.com/syncthing/syncthing/internal/versioner" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/db" + "github.com/syncthing/syncthing/lib/events" + "github.com/syncthing/syncthing/lib/ignore" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/scanner" + "github.com/syncthing/syncthing/lib/symlinks" + "github.com/syncthing/syncthing/lib/sync" + "github.com/syncthing/syncthing/lib/versioner" ) // TODO: Stop on errors diff --git a/internal/model/rwfolder_test.go b/lib/model/rwfolder_test.go similarity index 99% rename from internal/model/rwfolder_test.go rename to lib/model/rwfolder_test.go index 2f7aaa111..083b5e978 100644 --- a/internal/model/rwfolder_test.go +++ b/lib/model/rwfolder_test.go @@ -13,8 +13,8 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/scanner" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/scanner" + "github.com/syncthing/syncthing/lib/sync" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" diff --git a/internal/model/sharedpullerstate.go b/lib/model/sharedpullerstate.go similarity index 98% rename from internal/model/sharedpullerstate.go rename to lib/model/sharedpullerstate.go index 649215083..4828dcf5b 100644 --- a/internal/model/sharedpullerstate.go +++ b/lib/model/sharedpullerstate.go @@ -12,8 +12,8 @@ import ( "path/filepath" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/db" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/db" + "github.com/syncthing/syncthing/lib/sync" ) // A sharedPullerState is kept for each file that is being synced and is kept diff --git a/internal/model/sharedpullerstate_test.go b/lib/model/sharedpullerstate_test.go similarity index 97% rename from internal/model/sharedpullerstate_test.go rename to lib/model/sharedpullerstate_test.go index 7b6d90aac..edcafde0b 100644 --- a/internal/model/sharedpullerstate_test.go +++ b/lib/model/sharedpullerstate_test.go @@ -10,7 +10,7 @@ import ( "os" "testing" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" ) func TestSourceFileOK(t *testing.T) { diff --git a/internal/model/tempname.go b/lib/model/tempname.go similarity index 100% rename from internal/model/tempname.go rename to lib/model/tempname.go diff --git a/internal/model/tempname_test.go b/lib/model/tempname_test.go similarity index 100% rename from internal/model/tempname_test.go rename to lib/model/tempname_test.go diff --git a/internal/model/testdata/.stignore b/lib/model/testdata/.stignore similarity index 100% rename from internal/model/testdata/.stignore rename to lib/model/testdata/.stignore diff --git a/internal/model/testdata/.syncthing.file.tmp b/lib/model/testdata/.syncthing.file.tmp similarity index 100% rename from internal/model/testdata/.syncthing.file.tmp rename to lib/model/testdata/.syncthing.file.tmp diff --git a/internal/model/testdata/bar b/lib/model/testdata/bar similarity index 100% rename from internal/model/testdata/bar rename to lib/model/testdata/bar diff --git a/internal/model/testdata/baz/quux b/lib/model/testdata/baz/quux similarity index 100% rename from internal/model/testdata/baz/quux rename to lib/model/testdata/baz/quux diff --git a/internal/model/testdata/empty b/lib/model/testdata/empty similarity index 100% rename from internal/model/testdata/empty rename to lib/model/testdata/empty diff --git a/internal/model/testdata/foo b/lib/model/testdata/foo similarity index 100% rename from internal/model/testdata/foo rename to lib/model/testdata/foo diff --git a/internal/model/testdata/~syncthing~file.tmp b/lib/model/testdata/~syncthing~file.tmp similarity index 100% rename from internal/model/testdata/~syncthing~file.tmp rename to lib/model/testdata/~syncthing~file.tmp diff --git a/internal/model/util.go b/lib/model/util.go similarity index 100% rename from internal/model/util.go rename to lib/model/util.go diff --git a/internal/osutil/atomic.go b/lib/osutil/atomic.go similarity index 100% rename from internal/osutil/atomic.go rename to lib/osutil/atomic.go diff --git a/internal/osutil/atomic_test.go b/lib/osutil/atomic_test.go similarity index 100% rename from internal/osutil/atomic_test.go rename to lib/osutil/atomic_test.go diff --git a/internal/osutil/filenames_darwin.go b/lib/osutil/filenames_darwin.go similarity index 100% rename from internal/osutil/filenames_darwin.go rename to lib/osutil/filenames_darwin.go diff --git a/internal/osutil/filenames_unix.go b/lib/osutil/filenames_unix.go similarity index 100% rename from internal/osutil/filenames_unix.go rename to lib/osutil/filenames_unix.go diff --git a/internal/osutil/filenames_windows.go b/lib/osutil/filenames_windows.go similarity index 100% rename from internal/osutil/filenames_windows.go rename to lib/osutil/filenames_windows.go diff --git a/internal/osutil/glob_unix.go b/lib/osutil/glob_unix.go similarity index 100% rename from internal/osutil/glob_unix.go rename to lib/osutil/glob_unix.go diff --git a/internal/osutil/glob_windows.go b/lib/osutil/glob_windows.go similarity index 100% rename from internal/osutil/glob_windows.go rename to lib/osutil/glob_windows.go diff --git a/internal/osutil/hidden_unix.go b/lib/osutil/hidden_unix.go similarity index 100% rename from internal/osutil/hidden_unix.go rename to lib/osutil/hidden_unix.go diff --git a/internal/osutil/hidden_windows.go b/lib/osutil/hidden_windows.go similarity index 100% rename from internal/osutil/hidden_windows.go rename to lib/osutil/hidden_windows.go diff --git a/internal/osutil/lan_unix.go b/lib/osutil/lan_unix.go similarity index 100% rename from internal/osutil/lan_unix.go rename to lib/osutil/lan_unix.go diff --git a/internal/osutil/lan_windows.go b/lib/osutil/lan_windows.go similarity index 100% rename from internal/osutil/lan_windows.go rename to lib/osutil/lan_windows.go diff --git a/internal/osutil/lstat_broken.go b/lib/osutil/lstat_broken.go similarity index 100% rename from internal/osutil/lstat_broken.go rename to lib/osutil/lstat_broken.go diff --git a/internal/osutil/lstat_ok.go b/lib/osutil/lstat_ok.go similarity index 100% rename from internal/osutil/lstat_ok.go rename to lib/osutil/lstat_ok.go diff --git a/internal/osutil/mkdirall.go b/lib/osutil/mkdirall.go similarity index 100% rename from internal/osutil/mkdirall.go rename to lib/osutil/mkdirall.go diff --git a/internal/osutil/mkdirall_windows.go b/lib/osutil/mkdirall_windows.go similarity index 100% rename from internal/osutil/mkdirall_windows.go rename to lib/osutil/mkdirall_windows.go diff --git a/internal/osutil/osutil.go b/lib/osutil/osutil.go similarity index 99% rename from internal/osutil/osutil.go rename to lib/osutil/osutil.go index 03e3473e9..d97e611f9 100644 --- a/internal/osutil/osutil.go +++ b/lib/osutil/osutil.go @@ -16,7 +16,7 @@ import ( "runtime" "strings" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" ) var ErrNoHome = errors.New("No home directory found - set $HOME (or the platform equivalent).") diff --git a/internal/osutil/osutil_test.go b/lib/osutil/osutil_test.go similarity index 98% rename from internal/osutil/osutil_test.go rename to lib/osutil/osutil_test.go index 460b2fc5a..5dfdce182 100644 --- a/internal/osutil/osutil_test.go +++ b/lib/osutil/osutil_test.go @@ -11,7 +11,7 @@ import ( "runtime" "testing" - "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/lib/osutil" ) func TestInWriteableDir(t *testing.T) { diff --git a/internal/osutil/replacingwriter.go b/lib/osutil/replacingwriter.go similarity index 100% rename from internal/osutil/replacingwriter.go rename to lib/osutil/replacingwriter.go diff --git a/internal/osutil/replacingwriter_test.go b/lib/osutil/replacingwriter_test.go similarity index 100% rename from internal/osutil/replacingwriter_test.go rename to lib/osutil/replacingwriter_test.go diff --git a/internal/rc/debug.go b/lib/rc/debug.go similarity index 100% rename from internal/rc/debug.go rename to lib/rc/debug.go diff --git a/internal/rc/rc.go b/lib/rc/rc.go similarity index 99% rename from internal/rc/rc.go rename to lib/rc/rc.go index d66b6baed..b5975436a 100644 --- a/internal/rc/rc.go +++ b/lib/rc/rc.go @@ -26,8 +26,8 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/sync" ) // We set the API key via the STGUIAPIKEY variable when we launch the binary, diff --git a/internal/scanner/blockqueue.go b/lib/scanner/blockqueue.go similarity index 97% rename from internal/scanner/blockqueue.go rename to lib/scanner/blockqueue.go index dc08a6778..553aeec25 100644 --- a/internal/scanner/blockqueue.go +++ b/lib/scanner/blockqueue.go @@ -11,7 +11,7 @@ import ( "path/filepath" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" ) // The parallell hasher reads FileInfo structures from the inbox, hashes the diff --git a/internal/scanner/blocks.go b/lib/scanner/blocks.go similarity index 100% rename from internal/scanner/blocks.go rename to lib/scanner/blocks.go diff --git a/internal/scanner/blocks_test.go b/lib/scanner/blocks_test.go similarity index 100% rename from internal/scanner/blocks_test.go rename to lib/scanner/blocks_test.go diff --git a/internal/scanner/debug.go b/lib/scanner/debug.go similarity index 100% rename from internal/scanner/debug.go rename to lib/scanner/debug.go diff --git a/internal/scanner/doc.go b/lib/scanner/doc.go similarity index 100% rename from internal/scanner/doc.go rename to lib/scanner/doc.go diff --git a/internal/scanner/testdata/.stignore b/lib/scanner/testdata/.stignore similarity index 100% rename from internal/scanner/testdata/.stignore rename to lib/scanner/testdata/.stignore diff --git a/internal/scanner/testdata/afile b/lib/scanner/testdata/afile similarity index 100% rename from internal/scanner/testdata/afile rename to lib/scanner/testdata/afile diff --git a/internal/scanner/testdata/bfile b/lib/scanner/testdata/bfile similarity index 100% rename from internal/scanner/testdata/bfile rename to lib/scanner/testdata/bfile diff --git a/internal/scanner/testdata/dir1/cfile b/lib/scanner/testdata/dir1/cfile similarity index 100% rename from internal/scanner/testdata/dir1/cfile rename to lib/scanner/testdata/dir1/cfile diff --git a/internal/scanner/testdata/dir1/dfile b/lib/scanner/testdata/dir1/dfile similarity index 100% rename from internal/scanner/testdata/dir1/dfile rename to lib/scanner/testdata/dir1/dfile diff --git a/internal/scanner/testdata/dir2/cfile b/lib/scanner/testdata/dir2/cfile similarity index 100% rename from internal/scanner/testdata/dir2/cfile rename to lib/scanner/testdata/dir2/cfile diff --git a/internal/scanner/testdata/dir2/dfile b/lib/scanner/testdata/dir2/dfile similarity index 100% rename from internal/scanner/testdata/dir2/dfile rename to lib/scanner/testdata/dir2/dfile diff --git a/internal/scanner/testdata/dir3/cfile b/lib/scanner/testdata/dir3/cfile similarity index 100% rename from internal/scanner/testdata/dir3/cfile rename to lib/scanner/testdata/dir3/cfile diff --git a/internal/scanner/testdata/dir3/dfile b/lib/scanner/testdata/dir3/dfile similarity index 100% rename from internal/scanner/testdata/dir3/dfile rename to lib/scanner/testdata/dir3/dfile diff --git a/internal/scanner/testdata/excludes b/lib/scanner/testdata/excludes similarity index 100% rename from internal/scanner/testdata/excludes rename to lib/scanner/testdata/excludes diff --git a/internal/scanner/testdata/further-excludes b/lib/scanner/testdata/further-excludes similarity index 100% rename from internal/scanner/testdata/further-excludes rename to lib/scanner/testdata/further-excludes diff --git a/internal/scanner/walk.go b/lib/scanner/walk.go similarity index 98% rename from internal/scanner/walk.go rename to lib/scanner/walk.go index f9496beb1..f14cf35b2 100644 --- a/internal/scanner/walk.go +++ b/lib/scanner/walk.go @@ -16,10 +16,10 @@ import ( "unicode/utf8" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/db" - "github.com/syncthing/syncthing/internal/ignore" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/symlinks" + "github.com/syncthing/syncthing/lib/db" + "github.com/syncthing/syncthing/lib/ignore" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/symlinks" "golang.org/x/text/unicode/norm" ) diff --git a/internal/scanner/walk_test.go b/lib/scanner/walk_test.go similarity index 98% rename from internal/scanner/walk_test.go rename to lib/scanner/walk_test.go index 8aa85e9e3..9d1368f9f 100644 --- a/internal/scanner/walk_test.go +++ b/lib/scanner/walk_test.go @@ -18,8 +18,8 @@ import ( "testing" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/ignore" - "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/lib/ignore" + "github.com/syncthing/syncthing/lib/osutil" "golang.org/x/text/unicode/norm" ) diff --git a/internal/stats/debug.go b/lib/stats/debug.go similarity index 100% rename from internal/stats/debug.go rename to lib/stats/debug.go diff --git a/internal/stats/device.go b/lib/stats/device.go similarity index 96% rename from internal/stats/device.go rename to lib/stats/device.go index 569865588..2bace241e 100644 --- a/internal/stats/device.go +++ b/lib/stats/device.go @@ -10,7 +10,7 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/db" + "github.com/syncthing/syncthing/lib/db" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/internal/stats/folder.go b/lib/stats/folder.go similarity index 97% rename from internal/stats/folder.go rename to lib/stats/folder.go index 5066dfe82..0dcc1a024 100644 --- a/internal/stats/folder.go +++ b/lib/stats/folder.go @@ -11,7 +11,7 @@ import ( "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/db" + "github.com/syncthing/syncthing/lib/db" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/internal/symlinks/symlink_unix.go b/lib/symlinks/symlink_unix.go similarity index 94% rename from internal/symlinks/symlink_unix.go rename to lib/symlinks/symlink_unix.go index e3b6ab07d..11691ca6b 100644 --- a/internal/symlinks/symlink_unix.go +++ b/lib/symlinks/symlink_unix.go @@ -12,7 +12,7 @@ import ( "os" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/lib/osutil" ) var ( diff --git a/internal/symlinks/symlink_windows.go b/lib/symlinks/symlink_windows.go similarity index 99% rename from internal/symlinks/symlink_windows.go rename to lib/symlinks/symlink_windows.go index 6d0ba715c..958b23b9f 100644 --- a/internal/symlinks/symlink_windows.go +++ b/lib/symlinks/symlink_windows.go @@ -13,7 +13,7 @@ import ( "path/filepath" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/lib/osutil" "syscall" "unicode/utf16" diff --git a/internal/sync/debug.go b/lib/sync/debug.go similarity index 100% rename from internal/sync/debug.go rename to lib/sync/debug.go diff --git a/internal/sync/sync.go b/lib/sync/sync.go similarity index 100% rename from internal/sync/sync.go rename to lib/sync/sync.go diff --git a/internal/sync/sync_test.go b/lib/sync/sync_test.go similarity index 100% rename from internal/sync/sync_test.go rename to lib/sync/sync_test.go diff --git a/internal/upgrade/debug.go b/lib/upgrade/debug.go similarity index 100% rename from internal/upgrade/debug.go rename to lib/upgrade/debug.go diff --git a/internal/upgrade/testdata/github-releases.json b/lib/upgrade/testdata/github-releases.json similarity index 100% rename from internal/upgrade/testdata/github-releases.json rename to lib/upgrade/testdata/github-releases.json diff --git a/internal/upgrade/upgrade_common.go b/lib/upgrade/upgrade_common.go similarity index 100% rename from internal/upgrade/upgrade_common.go rename to lib/upgrade/upgrade_common.go diff --git a/internal/upgrade/upgrade_supported.go b/lib/upgrade/upgrade_supported.go similarity index 100% rename from internal/upgrade/upgrade_supported.go rename to lib/upgrade/upgrade_supported.go diff --git a/internal/upgrade/upgrade_test.go b/lib/upgrade/upgrade_test.go similarity index 100% rename from internal/upgrade/upgrade_test.go rename to lib/upgrade/upgrade_test.go diff --git a/internal/upgrade/upgrade_unsupp.go b/lib/upgrade/upgrade_unsupp.go similarity index 100% rename from internal/upgrade/upgrade_unsupp.go rename to lib/upgrade/upgrade_unsupp.go diff --git a/internal/upnp/debug.go b/lib/upnp/debug.go similarity index 100% rename from internal/upnp/debug.go rename to lib/upnp/debug.go diff --git a/internal/upnp/upnp.go b/lib/upnp/upnp.go similarity index 99% rename from internal/upnp/upnp.go rename to lib/upnp/upnp.go index 5784423ae..9dfa4224c 100644 --- a/internal/upnp/upnp.go +++ b/lib/upnp/upnp.go @@ -25,7 +25,7 @@ import ( "strings" "time" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/sync" ) // An IGD is a UPnP InternetGatewayDevice. diff --git a/internal/upnp/upnp_test.go b/lib/upnp/upnp_test.go similarity index 100% rename from internal/upnp/upnp_test.go rename to lib/upnp/upnp_test.go diff --git a/internal/versioner/.gitignore b/lib/versioner/.gitignore similarity index 100% rename from internal/versioner/.gitignore rename to lib/versioner/.gitignore diff --git a/internal/versioner/debug.go b/lib/versioner/debug.go similarity index 100% rename from internal/versioner/debug.go rename to lib/versioner/debug.go diff --git a/internal/versioner/external.go b/lib/versioner/external.go similarity index 97% rename from internal/versioner/external.go rename to lib/versioner/external.go index 5a84fc721..4cd761361 100644 --- a/internal/versioner/external.go +++ b/lib/versioner/external.go @@ -13,7 +13,7 @@ import ( "path/filepath" "strings" - "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/lib/osutil" ) func init() { diff --git a/internal/versioner/simple.go b/lib/versioner/simple.go similarity index 98% rename from internal/versioner/simple.go rename to lib/versioner/simple.go index 15bb9d2a0..8dbedb2e9 100644 --- a/internal/versioner/simple.go +++ b/lib/versioner/simple.go @@ -11,7 +11,7 @@ import ( "path/filepath" "strconv" - "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/lib/osutil" ) func init() { diff --git a/internal/versioner/staggered.go b/lib/versioner/staggered.go similarity index 98% rename from internal/versioner/staggered.go rename to lib/versioner/staggered.go index 8b0d415a4..1253713a7 100644 --- a/internal/versioner/staggered.go +++ b/lib/versioner/staggered.go @@ -12,8 +12,8 @@ import ( "strconv" "time" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/sync" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/sync" ) func init() { diff --git a/internal/versioner/trashcan.go b/lib/versioner/trashcan.go similarity index 98% rename from internal/versioner/trashcan.go rename to lib/versioner/trashcan.go index f68df77f7..cfdcd2b68 100644 --- a/internal/versioner/trashcan.go +++ b/lib/versioner/trashcan.go @@ -13,7 +13,7 @@ import ( "strconv" "time" - "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/lib/osutil" ) func init() { diff --git a/internal/versioner/trashcan_test.go b/lib/versioner/trashcan_test.go similarity index 100% rename from internal/versioner/trashcan_test.go rename to lib/versioner/trashcan_test.go diff --git a/internal/versioner/util.go b/lib/versioner/util.go similarity index 100% rename from internal/versioner/util.go rename to lib/versioner/util.go diff --git a/internal/versioner/versioner.go b/lib/versioner/versioner.go similarity index 100% rename from internal/versioner/versioner.go rename to lib/versioner/versioner.go diff --git a/internal/versioner/versioner_test.go b/lib/versioner/versioner_test.go similarity index 100% rename from internal/versioner/versioner_test.go rename to lib/versioner/versioner_test.go diff --git a/model/testdata/.stfolder b/model/testdata/.stfolder new file mode 100644 index 000000000..e69de29bb diff --git a/test/cli_test.go b/test/cli_test.go index 135ae9be6..9b7ac751f 100644 --- a/test/cli_test.go +++ b/test/cli_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - "github.com/syncthing/syncthing/internal/osutil" + "github.com/syncthing/syncthing/lib/osutil" ) func TestCLIReset(t *testing.T) { diff --git a/test/conflict_test.go b/test/conflict_test.go index 72cbe1a84..23001fabc 100644 --- a/test/conflict_test.go +++ b/test/conflict_test.go @@ -16,8 +16,8 @@ import ( "testing" "time" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/rc" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/rc" ) func TestConflictsDefault(t *testing.T) { diff --git a/test/filetype_test.go b/test/filetype_test.go index 14efbd203..9a558f46b 100644 --- a/test/filetype_test.go +++ b/test/filetype_test.go @@ -14,8 +14,8 @@ import ( "testing" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/rc" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/rc" ) func TestFileTypeChange(t *testing.T) { diff --git a/test/http_test.go b/test/http_test.go index a9888f55a..fd9dca530 100644 --- a/test/http_test.go +++ b/test/http_test.go @@ -17,7 +17,7 @@ import ( "testing" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/rc" + "github.com/syncthing/syncthing/lib/rc" ) var jsonEndpoints = []string{ diff --git a/test/ignore_test.go b/test/ignore_test.go index 78669df27..32e9be804 100644 --- a/test/ignore_test.go +++ b/test/ignore_test.go @@ -14,7 +14,7 @@ import ( "path/filepath" "testing" - "github.com/syncthing/syncthing/internal/symlinks" + "github.com/syncthing/syncthing/lib/symlinks" ) func TestIgnores(t *testing.T) { diff --git a/test/manypeers_test.go b/test/manypeers_test.go index 9c99613a3..55f622301 100644 --- a/test/manypeers_test.go +++ b/test/manypeers_test.go @@ -15,9 +15,9 @@ import ( "testing" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/rc" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/rc" ) func TestManyPeers(t *testing.T) { diff --git a/test/norestart_test.go b/test/norestart_test.go index 1b09bbf76..656942af2 100644 --- a/test/norestart_test.go +++ b/test/norestart_test.go @@ -14,9 +14,9 @@ import ( "testing" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/rc" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/rc" ) func TestAddDeviceWithoutRestart(t *testing.T) { diff --git a/test/override_test.go b/test/override_test.go index d91b10a49..285b1e150 100644 --- a/test/override_test.go +++ b/test/override_test.go @@ -17,9 +17,9 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/rc" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/rc" ) func TestOverride(t *testing.T) { diff --git a/test/scan_test.go b/test/scan_test.go index bd3df7b13..c19cb39fa 100644 --- a/test/scan_test.go +++ b/test/scan_test.go @@ -13,7 +13,7 @@ import ( "os" "testing" - "github.com/syncthing/syncthing/internal/rc" + "github.com/syncthing/syncthing/lib/rc" ) func TestSubScan(t *testing.T) { diff --git a/test/symlink_test.go b/test/symlink_test.go index f10a7470c..b23636423 100644 --- a/test/symlink_test.go +++ b/test/symlink_test.go @@ -16,9 +16,9 @@ import ( "testing" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/rc" - "github.com/syncthing/syncthing/internal/symlinks" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/rc" + "github.com/syncthing/syncthing/lib/symlinks" ) func symlinksSupported() bool { diff --git a/test/sync_test.go b/test/sync_test.go index 4bcb9f1ef..00de4a97c 100644 --- a/test/sync_test.go +++ b/test/sync_test.go @@ -18,8 +18,8 @@ import ( "time" "github.com/syncthing/protocol" - "github.com/syncthing/syncthing/internal/config" - "github.com/syncthing/syncthing/internal/rc" + "github.com/syncthing/syncthing/lib/config" + "github.com/syncthing/syncthing/lib/rc" ) const ( diff --git a/test/util.go b/test/util.go index 3d5983373..084483de0 100644 --- a/test/util.go +++ b/test/util.go @@ -26,9 +26,9 @@ import ( "time" "unicode" - "github.com/syncthing/syncthing/internal/osutil" - "github.com/syncthing/syncthing/internal/rc" - "github.com/syncthing/syncthing/internal/symlinks" + "github.com/syncthing/syncthing/lib/osutil" + "github.com/syncthing/syncthing/lib/rc" + "github.com/syncthing/syncthing/lib/symlinks" ) func init() {