aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-07-12 22:16:48 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-07-12 22:16:48 +0200
commit1751c648db75e5185c99766d40c34641c8ca8223 (patch)
tree996c243591877bb481b2726a7671d414c0671fb4
parent5fdbc767bc12cdaf7d969a598e6a2eb4b5e66b7c (diff)
Hide fileLength
-rw-r--r--meta/info.go6
-rw-r--r--meta/torrent_test.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/meta/info.go b/meta/info.go
index da117a5..153e803 100644
--- a/meta/info.go
+++ b/meta/info.go
@@ -50,7 +50,7 @@ func (i Info) TotalLength() int64 {
return i.Length
}
-func (i Info) FileLength(n int) int64 {
+func (i Info) fileLength(n int) int64 {
if len(i.Files) == 0 {
return i.Length
}
@@ -137,7 +137,7 @@ func (i Info) WriteAt(b []byte, off int64) (n int, err error) {
}
defer fd.Close()
- end := i.FileLength(n) - foff
+ end := i.fileLength(n) - foff
if blen := int64(len(b)); end > blen {
end = blen
}
@@ -168,7 +168,7 @@ func (i Info) ReadAt(b []byte, off int64) (n int, err error) {
}
defer fd.Close()
- end := i.FileLength(n) - foff
+ end := i.fileLength(n) - foff
if blen := int64(len(b)); end > blen {
end = blen
}
diff --git a/meta/torrent_test.go b/meta/torrent_test.go
index 19ab6cd..75cccc9 100644
--- a/meta/torrent_test.go
+++ b/meta/torrent_test.go
@@ -49,7 +49,7 @@ func TestPieces2(t *testing.T) {
}
func TestReadAt(t *testing.T) {
- //t.Skip()
+ t.Skip()
tor, err := Open("../examples/" + tors["bsd"])
if err != nil {
t.Error(err)