Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Implement the unsigned integer type #40

Merged
merged 2 commits into from
Jun 15, 2021

Conversation

zorchenhimer
Copy link
Contributor

This implements encoding and decoding unsigned integers.

Also included are test cases for both encoding and decoding.

This implements encoding and decoding unsigned integers.
@ianlopshire
Copy link
Owner

@zorchenhimer Thanks for taking the time to submit this PR! Everything looks great!

The only thing I see missing is listing the uint types as encodable here:

go-fixedwidth/encode.go

Lines 19 to 24 in 54451b9

// In order for a type to be encodable, it must implement
// the encoding.TextMarshaler interface or be based on one
// of the following builtin types: string, int, int64,
// int32, int16, int8, float64, float32, or struct.
// Pointers to encodable types and interfaces containing
// encodable types are also encodable.

As soon as that is updated I will merge and cut a release! Thanks again for the PR!

Add the various uint types to the list of supported builtin types listed
in the documentation for Marshal().
@zorchenhimer
Copy link
Contributor Author

I knew I was missing something, lol. I've added the types in there.

@ianlopshire ianlopshire merged commit 2df3b02 into ianlopshire:master Jun 15, 2021
@ianlopshire
Copy link
Owner

@zorchenhimer Thanks again for this PR! I'll cut a release as soon as #41 lands on master!

@zorchenhimer zorchenhimer deleted the uint branch June 19, 2021 18:56
ianlopshire pushed a commit that referenced this pull request Jan 5, 2022
This implements encoding and decoding bools.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants