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

Pass all files through gofmt #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

adamroyjones
Copy link

I don't know if you accept contributions, but we've needed to fork this for some internal reasons. This branch is only stylistic: it records the result of running

gofmt -w .

This brings the code into alignment with Go's established style.

(For our fork, we'll want to map things into memory. Tricks with memfd_create(2) and mmap(2) to create a suitable memory-backed "file" for use with the IPQS reader work, but this leads to issues around reported memory use (and so with cgroups v2). I don't want to try and circumvent those issues. It'll be easier for me to change things to hold a pointer to a buffer and to avoid the tricks.)

That is, this commit records the result of running

```sh
gofmt -w .
```

This brings the code into alignment with Go's established style.
Pass all files through `gofmt`
…eader

This will facilitate holding the contents in memory without large,
extraneous allocations. (As mentioned elsewhere, the memfd_create(2) and
mmap(2) tricks had issues.)
Change the type of FileReader.Handler from *os.File to *bytes.Reader
@IPQualityScore
Copy link
Owner

We are reviewing this and will get back to you.

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