lint: Clean up golangci-lint v1.60 complaints
This cleans up the linting results by adding checks for integer underflow/overflow in several places, suppressing the error in places where it has been checked, or fixing the types when possible.
This commit is contained in:
parent
2dad1a965e
commit
0256e09031
11 changed files with 47 additions and 12 deletions
|
|
@ -202,7 +202,7 @@ func handleIncludedSources(atar *tar.Reader, buildDir string) error {
|
|||
|
||||
// this assume "well" behaving tars, i.e. all dirs that lead
|
||||
// up to the tar are included etc
|
||||
mode := os.FileMode(hdr.Mode)
|
||||
mode := hdr.FileInfo().Mode()
|
||||
switch hdr.Typeflag {
|
||||
case tar.TypeDir:
|
||||
if err := os.Mkdir(target, mode); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue