Document Path function

master
HimbeerserverDE 2021-10-24 15:02:07 +02:00
parent a19b3d8f0e
commit 813d03a5c7
No known key found for this signature in database
GPG Key ID: 1A651504791E6A8B
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,8 @@ var playerNameChars = regexp.MustCompile("^[a-zA-Z0-9-_]+$")
var proxyDir string
var proxyDirOnce sync.Once
// Path prepends the directory the executable is in to the given path.
// It does not follow symlinks.
func Path(path ...string) string {
proxyDirOnce.Do(func() {
executable, err := os.Executable()