mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-06-27 04:28:30 +00:00
*.go: update to golangci-lint, and fix everything
install tools in the workflow actions Also switch away from deprecated ioutil Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
e7a79ae8a7
commit
42b655d8ee
19 changed files with 101 additions and 78 deletions
|
@ -5,7 +5,6 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
|
@ -266,7 +265,7 @@ func validateAction(c *cli.Context) error {
|
|||
}
|
||||
ts := mtree.NewTarStreamer(input, excludes, currentKeywords)
|
||||
|
||||
if _, err := io.Copy(ioutil.Discard, ts); err != nil && err != io.EOF {
|
||||
if _, err := io.Copy(io.Discard, ts); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
if err := ts.Close(); err != nil {
|
||||
|
@ -344,8 +343,8 @@ func validateAction(c *cli.Context) error {
|
|||
}
|
||||
|
||||
// output stateDh
|
||||
stateDh.WriteTo(fh)
|
||||
return nil
|
||||
_, err = stateDh.WriteTo(fh)
|
||||
return err
|
||||
}
|
||||
|
||||
// no spec manifest has been provided yet, so look for it on stdin
|
||||
|
@ -358,7 +357,8 @@ func validateAction(c *cli.Context) error {
|
|||
|
||||
// We can't check against more fields than in the specKeywords list, so
|
||||
// currentKeywords can only have a subset of specKeywords.
|
||||
specKeywords = specDh.UsedKeywords()
|
||||
// TODO this specKeywords is not even used
|
||||
_ = specDh.UsedKeywords()
|
||||
}
|
||||
|
||||
// This is a validation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue