Merge branch 'master' of github.com:schollz/croc

This commit is contained in:
Zack Scholl 2021-02-02 14:50:03 +00:00
commit 4481fe2336
2 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ package main
//go:generate git tag -af v$VERSION -m "v$VERSION" //go:generate git tag -af v$VERSION -m "v$VERSION"
import ( import (
"fmt" "log"
"github.com/schollz/croc/v8/src/cli" "github.com/schollz/croc/v8/src/cli"
) )
@ -28,6 +28,6 @@ func main() {
// } // }
// }() // }()
if err := cli.Run(); err != nil { if err := cli.Run(); err != nil {
fmt.Println(err) log.Fatalln(err)
} }
} }

View File

@ -225,9 +225,9 @@ func send(c *cli.Context) (err error) {
return return
} }
defer func() { defer func() {
err = os.Remove(fnames[0]) e := os.Remove(fnames[0])
if err != nil { if e != nil {
log.Error(err) log.Error(e)
} }
}() }()
} else if c.String("text") != "" { } else if c.String("text") != "" {
@ -236,9 +236,9 @@ func send(c *cli.Context) (err error) {
return return
} }
defer func() { defer func() {
err = os.Remove(fnames[0]) e := os.Remove(fnames[0])
if err != nil { if e != nil {
log.Error(err) log.Error(e)
} }
}() }()