Commit 51207b6e authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Detect program name in multizip.

parent 4cf05ec3
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"github.com/hanwen/go-fuse/zipfs" "github.com/hanwen/go-fuse/zipfs"
"log" "log"
"os" "os"
"path/filepath"
) )
var _ = log.Printf var _ = log.Printf
...@@ -16,8 +17,8 @@ func main() { ...@@ -16,8 +17,8 @@ func main() {
debug := flag.Bool("debug", false, "debug on") debug := flag.Bool("debug", false, "debug on")
flag.Parse() flag.Parse()
if flag.NArg() < 1 { if flag.NArg() < 1 {
// TODO - where to get program name? _, prog := filepath.Split(os.Args[0])
fmt.Println("usage: main MOUNTPOINT") fmt.Printf("usage: %s MOUNTPOINT\n", prog)
os.Exit(2) os.Exit(2)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment