lib/model: Move String method to folder (#4964)
This commit is contained in:
parent
91f1f3067a
commit
9d2b744c12
@ -9,6 +9,7 @@ package model
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -389,3 +390,7 @@ func (f *folder) basePause() time.Duration {
|
|||||||
}
|
}
|
||||||
return time.Duration(f.PullerPauseS) * time.Second
|
return time.Duration(f.PullerPauseS) * time.Second
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *folder) String() string {
|
||||||
|
return fmt.Sprintf("%s/%s@%p", f.Type, f.folderID, f)
|
||||||
|
}
|
||||||
|
|||||||
@ -7,8 +7,6 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/lib/config"
|
"github.com/syncthing/syncthing/lib/config"
|
||||||
"github.com/syncthing/syncthing/lib/db"
|
"github.com/syncthing/syncthing/lib/db"
|
||||||
"github.com/syncthing/syncthing/lib/fs"
|
"github.com/syncthing/syncthing/lib/fs"
|
||||||
@ -32,10 +30,6 @@ func newSendOnlyFolder(model *Model, cfg config.FolderConfiguration, _ versioner
|
|||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *sendOnlyFolder) String() string {
|
|
||||||
return fmt.Sprintf("sendOnlyFolder/%s@%p", f.folderID, f)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *sendOnlyFolder) PullErrors() []FileError {
|
func (f *sendOnlyFolder) PullErrors() []FileError {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,10 +131,6 @@ func newSendReceiveFolder(model *Model, cfg config.FolderConfiguration, ver vers
|
|||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *sendReceiveFolder) String() string {
|
|
||||||
return fmt.Sprintf("sendReceiveFolder/%s@%p", f.folderID, f)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *sendReceiveFolder) pull() bool {
|
func (f *sendReceiveFolder) pull() bool {
|
||||||
select {
|
select {
|
||||||
case <-f.initialScanFinished:
|
case <-f.initialScanFinished:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user