All checks were successful
Test / Create distribution (push) Successful in 42s
Test / Sandbox (push) Successful in 2m20s
Test / ShareFS (push) Successful in 3m22s
Test / Hpkg (push) Successful in 4m20s
Test / Sandbox (race detector) (push) Successful in 4m34s
Test / Hakurei (race detector) (push) Successful in 5m28s
Test / Hakurei (push) Successful in 2m41s
Test / Flake checks (push) Successful in 1m55s
This change should not change behaviour other than making output more consistent. Signed-off-by: Ophestra <cat@gensokyo.uk>
26 lines
475 B
Go
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...)))
|
|
}
|