Skip to content

Conversation

@g-linville
Copy link
Member

Signed-off-by: Grant Linville <grant@acorn.io>
}

// Assume the file is not text if it contains a null byte
if bytes.Contains(data, []byte{0}) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: bytes.IndexByte is probably slightly more performant.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Signed-off-by: Grant Linville <grant@acorn.io>
@g-linville g-linville merged commit eaaf0cd into gptscript-ai:main Sep 3, 2024
@g-linville g-linville deleted the sys-read-null branch September 3, 2024 16:28
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.

3 participants