Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions golink.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,13 @@ func init() {
}

var tmplFuncs = template.FuncMap{
// go is a template function that returns the hostname of the golink service.
// This is used throughout the UI to render links, but does not impact link resolution.
"go": func() string {
if devMode() {
// in dev mode, just use "go" instead of "localhost:8080"
return defaultHostname
}
return *hostname
},
}
Expand Down
Loading