All checks were successful
Test / Create distribution (push) Successful in 43s
Test / Sandbox (push) Successful in 2m34s
Test / Hakurei (push) Successful in 3m26s
Test / ShareFS (push) Successful in 3m23s
Test / Hpkg (push) Successful in 4m23s
Test / Sandbox (race detector) (push) Successful in 4m38s
Test / Hakurei (race detector) (push) Successful in 5m33s
Test / Flake checks (push) Successful in 1m45s
This is not really just library wrapper functions, but instead implements the callbacks, so fuse-operations makes more sense. Signed-off-by: Ophestra <cat@gensokyo.uk>
28 lines
510 B
Go
28 lines
510 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
"path"
|
|
"runtime"
|
|
)
|
|
|
|
// 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() {
|
|
runtime.LockOSThread()
|
|
log.SetFlags(0)
|
|
log.SetPrefix(executableName + ": ")
|
|
|
|
os.Exit(_main(len(os.Args), copyStrings(os.Args...)))
|
|
}
|