]> Cypherpunks.ru repositories - netstring.git/blobdiff - ns_test.go
Raise copyright years
[netstring.git] / ns_test.go
index cf519680481796deb18c7e6d2871b1f2460ee639..dbdaa8d4c81505eca1059b8a04a5d16582fa9519 100644 (file)
@@ -1,6 +1,6 @@
 /*
 netstring -- netstring format serialization library
-Copyright (C) 2015-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2015-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ package netstring
 
 import (
        "bytes"
-       "io/ioutil"
+       "io"
        "testing"
        "testing/quick"
 )
@@ -72,7 +72,7 @@ func TestSymmetric(t *testing.T) {
                        if n, err := r.Next(); err != nil || n != uint64(len(data)) {
                                return false
                        }
-                       got, err := ioutil.ReadAll(r)
+                       got, err := io.ReadAll(r)
                        if err != nil || bytes.Compare(got, data) != 0 {
                                return false
                        }
@@ -158,7 +158,7 @@ func TestExample(t *testing.T) {
        if size, err := r.Next(); err != nil || size != 6 {
                t.FailNow()
        }
-       if data, err := ioutil.ReadAll(r); err != nil || string(data) != "world!" {
+       if data, err := io.ReadAll(r); err != nil || string(data) != "world!" {
                t.FailNow()
        }
 }