diff --git a/cmd/stbench/main.go b/cmd/stbench/main.go index d6dcb918..2295b01e 100644 --- a/cmd/stbench/main.go +++ b/cmd/stbench/main.go @@ -92,7 +92,7 @@ loop: return t1.Sub(t0) } -// report stops the given process and reports on it's resource usage in two +// report stops the given process and reports on its resource usage in two // ways: human readable to stderr, and CSV to stdout. func report(p *rc.Process, wallTime time.Duration) { sv, err := p.SystemVersion() diff --git a/cmd/strelaysrv/session.go b/cmd/strelaysrv/session.go index 6f0e2478..cf381e34 100644 --- a/cmd/strelaysrv/session.go +++ b/cmd/strelaysrv/session.go @@ -189,7 +189,7 @@ done: // We can end up here in 3 cases: // 1. Timeout joining, in which case there are potentially entries in pendingSessions // 2. General session end/timeout, in which case there are entries in activeSessions - // 3. Protocol handler calls dropSession as one of it's clients disconnects. + // 3. Protocol handler calls dropSession as one of its clients disconnects. sessionMut.Lock() delete(pendingSessions, string(s.serverkey)) diff --git a/lib/connections/service.go b/lib/connections/service.go index 90633228..3eb68b21 100644 --- a/lib/connections/service.go +++ b/lib/connections/service.go @@ -227,7 +227,7 @@ next: } // If we have a relay connection, and the new incoming connection is - // not a relay connection, we should drop that, and prefer the this one. + // not a relay connection, we should drop that, and prefer this one. connected := s.model.ConnectedTo(remoteID) s.curConMut.Lock() ct, ok := s.currentConnection[remoteID] diff --git a/lib/discover/cache.go b/lib/discover/cache.go index 794a4983..fc8aef7f 100644 --- a/lib/discover/cache.go +++ b/lib/discover/cache.go @@ -180,9 +180,9 @@ func (m *cachingMux) Cache() map[protocol.DeviceID]CacheEntry { } } - // Then ask the finder itself for it's cache and do the same. If this + // Then ask the finder itself for its cache and do the same. If this // finder is a global discovery client, it will have no cache. If it's - // a local discovery client, this will be it's current state. + // a local discovery client, this will be its current state. for k, v := range m.finders[i].Cache() { if v.found { cur := res[k] diff --git a/lib/discover/cache_test.go b/lib/discover/cache_test.go index bb793169..9a2542c6 100644 --- a/lib/discover/cache_test.go +++ b/lib/discover/cache_test.go @@ -34,7 +34,7 @@ func TestCacheUnique(t *testing.T) { c.(*cachingMux).ServeBackground() defer c.Stop() - // Add a fake discovery service and verify we get it's answers through the + // Add a fake discovery service and verify we get its answers through the // cache. f1 := &fakeDiscovery{addresses0} diff --git a/lib/model/model.go b/lib/model/model.go index 2f06b5b3..62aa87c2 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -1108,7 +1108,7 @@ func (m *Model) handleDeintroductions(introducerCfg config.DeviceConfiguration, if !foldersDevices.has(folderCfg.Devices[i].DeviceID, folderCfg.ID) { // We could not find that folder shared on the // introducer with the device that was introduced to us. - // We should follow and unshare aswell. + // We should follow and unshare as well. l.Infof("Unsharing folder %s with %v as introducer %v no longer shares the folder with that device", folderCfg.Description(), folderCfg.Devices[i].DeviceID, folderCfg.Devices[i].IntroducedBy) folderCfg.Devices = append(folderCfg.Devices[:i], folderCfg.Devices[i+1:]...) i-- diff --git a/lib/model/model_test.go b/lib/model/model_test.go index df3df013..4d2242b1 100644 --- a/lib/model/model_test.go +++ b/lib/model/model_test.go @@ -1908,7 +1908,7 @@ func TestIssue3164(t *testing.T) { func TestIssue4357(t *testing.T) { db := db.OpenMemory() cfg := defaultConfig.RawCopy() - // Create a separate wrapper not to polute other tests. + // Create a separate wrapper not to pollute other tests. wrapper := config.Wrap("/tmp/test", config.Configuration{}) m := NewModel(wrapper, protocol.LocalDeviceID, "syncthing", "dev", db, nil) m.ServeBackground() diff --git a/lib/model/rwfolder_test.go b/lib/model/rwfolder_test.go index 3656fee1..e505631e 100644 --- a/lib/model/rwfolder_test.go +++ b/lib/model/rwfolder_test.go @@ -386,7 +386,7 @@ func TestWeakHash(t *testing.T) { } } -// Test that updating a file removes it's old blocks from the blockmap +// Test that updating a file removes its old blocks from the blockmap func TestCopierCleanup(t *testing.T) { iterFn := func(folder, file string, index int32) bool { return true diff --git a/lib/model/sharedpullerstate.go b/lib/model/sharedpullerstate.go index e3446fe5..500b5341 100644 --- a/lib/model/sharedpullerstate.go +++ b/lib/model/sharedpullerstate.go @@ -146,7 +146,7 @@ func (s *sharedPullerState) tempFile() (io.WriterAt, error) { } else if !s.ignorePerms { // With sufficiently bad luck when exiting or crashing, we may have // had time to chmod the temp file to read only state but not yet - // moved it to it's final name. This leaves us with a read only temp + // moved it to its final name. This leaves us with a read only temp // file that we're going to try to reuse. To handle that, we need to // make sure we have write permissions on the file before opening it. // diff --git a/lib/osutil/atomic.go b/lib/osutil/atomic.go index 30b5e3bf..9618b724 100644 --- a/lib/osutil/atomic.go +++ b/lib/osutil/atomic.go @@ -21,7 +21,7 @@ var ( // An AtomicWriter is an *os.File that writes to a temporary file in the same // directory as the final path. On successful Close the file is renamed to -// it's final path. Any error on Write or during Close is accumulated and +// its final path. Any error on Write or during Close is accumulated and // returned on Close, so a lazy user can ignore errors until Close. type AtomicWriter struct { path string diff --git a/lib/osutil/osutil.go b/lib/osutil/osutil.go index 889509f3..0e8a01ed 100644 --- a/lib/osutil/osutil.go +++ b/lib/osutil/osutil.go @@ -35,9 +35,9 @@ func TryRename(filesystem fs.Filesystem, from, to string) error { }) } -// Rename moves a temporary file to it's final place. +// Rename moves a temporary file to its final place. // Will make sure to delete the from file if the operation fails, so use only -// for situations like committing a temp file to it's final location. +// for situations like committing a temp file to its final location. // Tries hard to succeed on various systems by temporarily tweaking directory // permissions and removing the destination file when necessary. func Rename(filesystem fs.Filesystem, from, to string) error { @@ -114,7 +114,7 @@ func withPreparedTarget(filesystem fs.Filesystem, from, to string, f func() erro // copyFileContents copies the contents of the file named src to the file named // by dst. The file will be created if it does not already exist. If the -// destination file exists, all it's contents will be replaced by the contents +// destination file exists, all its contents will be replaced by the contents // of the source file. func copyFileContents(filesystem fs.Filesystem, src, dst string) (err error) { in, err := filesystem.Open(src) diff --git a/lib/protocol/protocol.go b/lib/protocol/protocol.go index 76a44398..22275a57 100644 --- a/lib/protocol/protocol.go +++ b/lib/protocol/protocol.go @@ -127,7 +127,7 @@ type message interface { type asyncMessage struct { msg message - done chan struct{} // done closes when we're done marshalling the message and it's contents can be reused + done chan struct{} // done closes when we're done marshalling the message and its contents can be reused } const ( diff --git a/test/conflict_test.go b/test/conflict_test.go index f4268691..18f9e61e 100644 --- a/test/conflict_test.go +++ b/test/conflict_test.go @@ -348,7 +348,7 @@ func TestConflictsIndexReset(t *testing.T) { log.Println("Updating...") - // change s2/file2 a few times, so that it's version counter increases. + // change s2/file2 a few times, so that its version counter increases. // This will make the file on the cluster look newer than what we have // locally after we rest the index, unless we have a fix for that. diff --git a/test/sync_test.go b/test/sync_test.go index 349f9362..45a46cd4 100644 --- a/test/sync_test.go +++ b/test/sync_test.go @@ -258,7 +258,7 @@ func testSyncCluster(t *testing.T) { break } - // Alter the "test-appendfile" without changing it's modification time. Sneaky! + // Alter the "test-appendfile" without changing its modification time. Sneaky! fi, err := os.Stat("s1/test-appendfile") if err != nil { t.Fatal(err)