path

package module
v0.0.0-...-a499989 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 4 Imported by: 6

Documentation

Overview

Package path provides basic path functions for OS specific path folder names and a function to get the base path of where the binary resides

Index

Constants

View Source
const IsWindows = false

IsWindows is a flag to determine if the current OS is windows.

View Source
const PathSeparator = "/"

PathSeparator provides windows or non-windows folder path separator.

Variables

This section is empty.

Functions

func GetBinaryPath

func GetBinaryPath() (path string)

GetBinaryPath will return the location of the binary or the project in go run mode. Note, if you compiled a go Binary and exported it into an OSX App Package folder, the base path would be the root of where the app lives If you are running a go binary from the command line using go run, the base path returned of where the binary is located so long as you are in the directory of the main and you pass $(cwd) to the first parameter of the go run Else the path when compiled is easily found by using filepath.Dir(os.Executable())

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL