diff options
Diffstat (limited to 'cmd/sharefs/main.go')
| -rw-r--r-- | cmd/sharefs/main.go | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/cmd/sharefs/main.go b/cmd/sharefs/main.go index c90c8624..941a1668 100644 --- a/cmd/sharefs/main.go +++ b/cmd/sharefs/main.go @@ -3,23 +3,14 @@ package main import ( "log" "os" - "path" ) -// executableName is the [path.Base] name of the executable that started the current process. -var executableName = func() string { - if len(os.Args) > 0 { - return path.Base(os.Args[0]) - } else if name, err := os.Executable(); err != nil { - return "sharefs" - } else { - return path.Base(name) - } -}() +// sharefsName is the prefix used by log.std in the sharefs process. +const sharefsName = "sharefs" func main() { log.SetFlags(0) - log.SetPrefix(executableName + ": ") + log.SetPrefix(sharefsName + ": ") - os.Exit(_main(len(os.Args), copyStrings(os.Args...))) + os.Exit(_main(os.Args...)) } |
