Skip to content

Commit 701eb19

Browse files
committed
Use default hostname in UI when in dev mode
Updates #144 Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <[email protected]>
1 parent b3ab9a6 commit 701eb19

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

golink.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,13 @@ func init() {
299299
}
300300

301301
var tmplFuncs = template.FuncMap{
302+
// go is a template function that returns the hostname of the golink service.
303+
// This is used throughout the UI to render links, but does not impact link resolution.
302304
"go": func() string {
305+
if devMode() {
306+
// in dev mode, just use "go" instead of "localhost:8080"
307+
return defaultHostname
308+
}
303309
return *hostname
304310
},
305311
}

0 commit comments

Comments
 (0)