diff options
author | Abhinav Gupta <mail@abhinavg.net> | 2021-12-09 21:42:38 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 06:42:38 +0100 |
commit | 1a8f803f55879b5d0cb40e88cb5981d64555c1aa (patch) | |
tree | 6afd0e2360ad7d3fc0ebf4d02e3298e7d4097dd5 /storage/filesystem/object_test.go | |
parent | f438ca3483c785f8649f6dbd96f1a1db3c6a2eaa (diff) | |
download | go-git-1a8f803f55879b5d0cb40e88cb5981d64555c1aa.tar.gz |
storage: filesystem, switch from os.SEEK_* to io.Seek* (#421)
The `os.SEEK_*` constants have been deprecated since Go 1.7.
It is now recommended to use the equivalent `io.Seek*` constants.
Switch `os.SEEK_CUR` to `io.SeekCurrent`,
and `os.SEEK_SET` to `io.SeekStart`.
Diffstat (limited to 'storage/filesystem/object_test.go')
-rw-r--r-- | storage/filesystem/object_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/filesystem/object_test.go b/storage/filesystem/object_test.go index 59b40d3..1c3267b 100644 --- a/storage/filesystem/object_test.go +++ b/storage/filesystem/object_test.go @@ -71,7 +71,7 @@ func (s *FsSuite) TestGetFromPackfileKeepDescriptors(c *C) { pack1, err := dg.ObjectPack(packfiles[0]) c.Assert(err, IsNil) - pack1.Seek(42, os.SEEK_SET) + pack1.Seek(42, io.SeekStart) err = o.Close() c.Assert(err, IsNil) @@ -79,7 +79,7 @@ func (s *FsSuite) TestGetFromPackfileKeepDescriptors(c *C) { pack2, err := dg.ObjectPack(packfiles[0]) c.Assert(err, IsNil) - offset, err := pack2.Seek(0, os.SEEK_CUR) + offset, err := pack2.Seek(0, io.SeekCurrent) c.Assert(err, IsNil) c.Assert(offset, Equals, int64(0)) |