Files
hakurei/cmd/sharefs/main.go
Ophestra 6d3bd27220 cmd/sharefs: expand fuse_main
This change should not change behaviour other than making output more consistent.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27 02:30:28 +09:00

26 lines
475 B
Go

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)
}
}()
func main() {
log.SetFlags(0)
log.SetPrefix(executableName + ": ")
os.Exit(_main(len(os.Args), copyStrings(os.Args...)))
}