Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add slice read/writes #5

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Add slice read/writes #5

merged 1 commit into from
Oct 28, 2024

Conversation

kelindar
Copy link
Owner

This pull request introduces new methods for reading and writing arrays of various data types in the Reader and Writer classes. It also includes corresponding test cases to ensure the new methods work correctly.

New Methods for Reading Arrays:

  • reader.go: Added methods to read arrays of uint8, uint16, uint32, uint64, and uint (ReadUint8s, ReadUint16s, ReadUint32s, ReadUint64s, ReadUints).
  • reader.go: Added methods to read arrays of int8, int16, int32, int64, and int (ReadInt8s, ReadInt16s, ReadInt32s, ReadInt64s, ReadInts).
  • reader.go: Added methods to read arrays of float32 and float64 (ReadFloat32s, ReadFloat64s).
  • reader.go: Added method to read arrays of string (ReadStrings).

New Methods for Writing Arrays:

  • writer.go: Added methods to write arrays of uint8, uint16, uint32, uint64, and uint (WriteUint8s, WriteUint16s, WriteUint32s, WriteUint64s, WriteUints).
  • writer.go: Added methods to write arrays of int8, int16, int32, int64, and int (WriteInt8s, WriteInt16s, WriteInt32s, WriteInt64s, WriteInts).
  • writer.go: Added methods to write arrays of float32 and float64 (WriteFloat32s, WriteFloat64s).
  • writer.go: Added method to write arrays of string (WriteStrings).

Test Cases:

  • writer_test.go: Added test cases for the new array read and write methods, including float32s, float64s, uint8s, uint16s, uint32s, uint64s, uints, int8s, int16s, int32s, int64s, ints, and strings.

@kelindar kelindar merged commit 355b0f8 into main Oct 28, 2024
2 checks passed
@kelindar kelindar deleted the slices branch October 28, 2024 17:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant