Documentation ¶
Index ¶
- Constants
- Variables
- func ArcPathDefaults() ([]string, error)
- func AskAndGetBrowserPath() (string, error)
- func BravePathDefaults() ([]string, error)
- func ChromePathDefaults() ([]string, error)
- func ChromiumPathDefaults() ([]string, error)
- func ConfigureBrowserSelection(browserName string, path string) error
- func DetectInstallation(browserKey string) (string, bool)
- func EdgePathDefaults() ([]string, error)
- func Find() (string, error)
- func FirefoxDevPathDefaults() ([]string, error)
- func FirefoxPathDefaults() ([]string, error)
- func GetBrowserKey(b string) string
- func GrantedIntroduction()
- func HandleBrowserWizard(ctx *cli.Context) (string, error)
- func HandleLinuxBrowserSearch() (string, error)
- func HandleManualBrowserSelection() (string, error)
- func HandleOSXBrowserSearch() (string, error)
- func HandleWindowsBrowserSearch() (string, error)
- func OpenCommand() string
- func RunFirefoxExtensionPrompts(browserPath string, browserName string) error
- func SSOBrowser(grantedDefaultBrowser string) error
- func SafariPathDefaults() ([]string, error)
- func UserHasDefaultBrowser(ctx *cli.Context) (bool, error)
- func WaterfoxPathDefaults() ([]string, error)
- type Array
- type Dict
- type IntDict
- type Pdict
Constants ¶
View Source
const ( ChromeKey string = "CHROME" BraveKey string = "BRAVE" EdgeKey string = "EDGE" FirefoxKey string = "FIREFOX" WaterfoxKey string = "WATERFOX" ChromiumKey string = "CHROMIUM" SafariKey string = "SAFARI" StdoutKey string = "STDOUT" FirefoxStdoutKey string = "FIREFOX_STDOUT" ArcKey string = "ARC" FirefoxDevEditionKey string = "FIREFOX_DEV" CommonFateKey string = "COMMON_FATE" )
A browser supported by Granted.
Variables ¶
View Source
var ArcPathMac = []string{"/Applications/Arc.app/Contents/MacOS/Arc"}
View Source
var BravePathLinux = []string{`/usr/bin/brave-browser`, `/../../mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe`}
View Source
var BravePathMac = []string{"/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"}
View Source
var BravePathWindows = []string{`\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe`}
View Source
var ChromePathLinux = []string{`/usr/bin/google-chrome`, `/../../mnt/c/Program Files/Google/Chrome/Application/chrome.exe`, `/../../mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`}
View Source
var ChromePathMac = []string{"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"}
A few default paths to check for the browser
View Source
var ChromePathWindows = []string{`\Program Files\Google\Chrome\Application\chrome.exe`, `\Program Files (x86)\Google\Chrome\Application\chrome.exe`}
View Source
var ChromiumPathLinux = []string{`/usr/bin/chromium`, `/../../mnt/c/Program Files/Chromium/chromium.exe`}
View Source
var ChromiumPathMac = []string{"/Applications/Chromium.app/Contents/MacOS/Chromium"}
View Source
var ChromiumPathWindows = []string{`\Program Files\Chromium\chromium.exe`}
View Source
var EdgePathLinux = []string{`/usr/bin/edge`, `/../../mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe`}
View Source
var EdgePathMac = []string{"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"}
View Source
var EdgePathWindows = []string{`\Program Files (x86)\Microsoft\Edge\Application\msedge.exe`}
View Source
var FirefoxDevPathLinux = []string{`/usr/bin/firefox-developer`, `/../../mnt/c/Program Files/Firefox Developer Edition/firefox.exe`}
View Source
var FirefoxDevPathMac = []string{"/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox"}
View Source
var FirefoxDevPathWindows = []string{`\Program Files\Firefox Developer Edition\firefox.exe`}
View Source
var FirefoxPathLinux = []string{`/usr/bin/firefox`, `/../../mnt/c/Program Files/Mozilla Firefox/firefox.exe`}
View Source
var FirefoxPathMac = []string{"/Applications/Firefox.app/Contents/MacOS/firefox"}
View Source
var FirefoxPathWindows = []string{`\Program Files\Mozilla Firefox\firefox.exe`}
View Source
var SafariPathMac = []string{"/Applications/Safari.app/Contents/MacOS/Safari"}
View Source
var WaterfoxPathLinux = []string{`/usr/bin/waterfox`, `/../../mnt/c/Program Files/Waterfox/waterfox.exe`}
View Source
var WaterfoxPathMac = []string{"/Applications/Waterfox.app/Contents/MacOS/waterfox"}
View Source
var WaterfoxPathWindows = []string{`\Program Files\Waterfox\waterfox.exe`}
Functions ¶
func ArcPathDefaults ¶ added in v0.16.0
func AskAndGetBrowserPath ¶
func BravePathDefaults ¶
func ChromePathDefaults ¶
func ChromiumPathDefaults ¶
func ConfigureBrowserSelection ¶
ConfigureBrowserSelection will verify the existance of the browser executable and promot for a path if it cannot be found
func DetectInstallation ¶
DetectInstallation checks if the default filepath exists for the browser executables on the current os returns the detected path
func EdgePathDefaults ¶
func FirefoxDevPathDefaults ¶ added in v0.16.0
func FirefoxPathDefaults ¶
func GetBrowserKey ¶
func GrantedIntroduction ¶
func GrantedIntroduction()
func HandleBrowserWizard ¶
func HandleOSXBrowserSearch ¶
func OpenCommand ¶ added in v0.3.1
func OpenCommand() string
OpenCommand returns the terminal command to open a browser. This is system dependent - for MacOS we use 'open', whereas for Linux we use 'xdg-open', 'x-www-browser', or 'www-browser'.
func SSOBrowser ¶
func SafariPathDefaults ¶ added in v0.9.0
func UserHasDefaultBrowser ¶
Checks the config to see if the user has already set up their default browser
func WaterfoxPathDefaults ¶ added in v0.19.0
Types ¶
Click to show internal directories.
Click to hide internal directories.