Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handler = http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("content-type", "text/plain") if mostRecentFailure != nil { fmt.Fprintf(rw, "update failure: %s\n\n", mostRecentFailure) } if invalidToken { fmt.Fprintf(rw, "token is invalid, only updating hourly\n\n") } version.Render(rw) })
Functions ¶
func AutoUpdate ¶
func AutoUpdate()
AutoUpdate will periodically check for an update (a little over hourly) and install it unless the LM_DISABLE_SELFUPDATE env var is set. If the LM_GH_TOKEN environment variable is set this will check more often (closer to every minute.) The Token should have public_repo access. The token should include the `Basic ` prefix.
func MaybeUpdate ¶
func MaybeUpdate()
MaybeUpdate will check for an update and install it immediately. If the LM_GH_TOKEN environment variable is set, it will be treated as a github personal access token, instead of anonymous access.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.