There is some refactoring to simplify things, but mostly handle files
which report size 0 in `stat`, but actually contain data when read.
We try to read up to the small buffer, if we read whole file, we use
that as contents, otherwise we still skip the file, as we need to write
tar header with size _before_ we read the whole file.
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
There's a cyclic dependency on siderolink library which imports talos
machinery back. We will fix that after we get talos pushed under a new
name.
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
The gofumports does everything that gofumpt does with the addition of
formatting imports. This change proposes the use of the `-local` flag so
that we can have imports separated in the following order:
- standard library
- third party
- Talos specific
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>