aboutsummaryrefslogtreecommitdiffstats
path: root/internal/port/gopher.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/port/gopher.go')
-rw-r--r--internal/port/gopher.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/port/gopher.go b/internal/port/gopher.go
index cb5e60c..fc7b754 100644
--- a/internal/port/gopher.go
+++ b/internal/port/gopher.go
@@ -69,18 +69,15 @@ func urlToGopherNav(url string) (items []GopherNavItem) {
69 partialURL = partialURL + "/" + part 69 partialURL = partialURL + "/" + part
70 } 70 }
71 71
72 current := false
73 if i == len(parts)-1 || (len(parts) == 2 && i == 0) {
74 current = true
75 }
76
77 items = append(items, GopherNavItem{ 72 items = append(items, GopherNavItem{
78 Label: part, 73 Label: part,
79 URL: partialURL, 74 URL: partialURL,
80 Current: current, 75 Current: false,
81 }) 76 })
82 } 77 }
83 78
79 items[len(items)-1].Current = true
80
84 return 81 return
85} 82}
86 83