mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 03:55:54 +00:00
Cleanup test output
This commit is contained in:
parent
66aea5cd99
commit
ff2b30ff5d
2 changed files with 5 additions and 4 deletions
|
@ -129,6 +129,8 @@ func (p *TestPackage) CreateContext(filename string) *gas.Context {
|
|||
func (p *TestPackage) Close() {
|
||||
if p.ondisk {
|
||||
err := os.RemoveAll(p.Path)
|
||||
log.Println(err)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ body, err := ioutil.ReadFile(f)
|
|||
if err != nil {
|
||||
log.Printf("Error: %v\n", err)
|
||||
}
|
||||
log.Print(f)
|
||||
log.Print(body)
|
||||
|
||||
}`, 1}, {`
|
||||
package main
|
||||
|
@ -493,8 +493,7 @@ func main() {
|
|||
fmt.Printf("Error: %v\n", err)
|
||||
}
|
||||
body := make([]byte, 5)
|
||||
n1, err := f.Read(body)
|
||||
if err != nil {
|
||||
if _, err = f.Read(body); err != nil {
|
||||
fmt.Printf("Error: %v\n", err)
|
||||
}
|
||||
fmt.Fprintf(w, "%s", body)
|
||||
|
|
Loading…
Reference in a new issue