main: fail-pretty with no args
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
22a474917c
commit
e98f614543
1 changed files with 4 additions and 0 deletions
4
main.go
4
main.go
|
@ -8,6 +8,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
if len(os.Args[1:]) == 0 {
|
||||||
|
fmt.Println("please provide path to a tar archive")
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
fh, err := os.Open(os.Args[1])
|
fh, err := os.Open(os.Args[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue