Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StartupURL = flag.String("startup-url", "https://google.com", "URL to launch at startup") // IsHTTPServer needs to be exported for use in tests IsHTTPServer = flag.Bool("http-server", false, "Run as an HTTP service") // HTTPServerPort also needs to be exported for use in tests HTTPServerPort = flag.String("http-server-port", "4333", "HTTP server address") // IsTesting is used in tests, so it needs to be exported IsTesting = false )
View Source
var CurrentTab *tab
CurrentTab is the currently active tab in the TTY browser
View Source
var ( // IsMonochromeMode decides whether to render the TTY in full colour or monochrome IsMonochromeMode = false )
View Source
var Tabs = make(map[int]*tab)
Tabs is a map of all tab data
Functions ¶
func HTTPServerStart ¶
func HTTPServerStart()
HTTPServerStart starts the HTTP server is a seperate service from the usual interactive TTY app. It accepts normal HTTP requests and uses the path portion of the URL as the entry to the Browsh URL bar. It then returns a simple line-broken text version of whatever the browser loads. So for example, if you request `curl browsh-http-service.com/http://something.com`, it will return: `Something `
func MainEntry ¶
func MainEntry()
MainEntry decides between running Browsh as a CLI app or as an HTTP web server
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.