Move FileIntf to files package, expose Iterator type

This is where FileIntf is used, so it should be defined here (it's not
a protocol thing, really).
This commit is contained in:
Jakob Borg
2015-01-09 08:18:42 +01:00
parent 2d047fa428
commit 8bc7d259f4
7 changed files with 55 additions and 49 deletions

View File

@@ -43,7 +43,7 @@ func main() {
if *device == "" {
log.Printf("*** Global index for folder %q", *folder)
fs.WithGlobalTruncated(func(fi protocol.FileIntf) bool {
fs.WithGlobalTruncated(func(fi files.FileIntf) bool {
f := fi.(protocol.FileInfoTruncated)
fmt.Println(f)
fmt.Println("\t", fs.Availability(f.Name))
@@ -55,7 +55,7 @@ func main() {
log.Fatal(err)
}
log.Printf("*** Have index for folder %q device %q", *folder, n)
fs.WithHaveTruncated(n, func(fi protocol.FileIntf) bool {
fs.WithHaveTruncated(n, func(fi files.FileIntf) bool {
f := fi.(protocol.FileInfoTruncated)
fmt.Println(f)
return true