Skip to content

Commit 71f3e5a

Browse files
committed
fix lint
1 parent 9508111 commit 71f3e5a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

routers/web/devtest/devtest.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ func prepareMockDataIconGallery(ctx *context.Context) {
395395
grouped := map[string][]string{}
396396
for _, name := range allNames {
397397
prefix := "other"
398-
if idx := strings.Index(name, "-"); idx != -1 {
399-
prefix = name[:idx]
398+
if before, _, ok := strings.Cut(name, "-"); ok {
399+
prefix = before
400400
}
401401
grouped[prefix] = append(grouped[prefix], name)
402402
}

templates/devtest/icon-gallery.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{template "devtest/devtest-header"}}
22
<div class="page-content devtest ui container">
33
<h1>Icon Gallery</h1>
4-
<p>All <strong>{{.IconCount}}</strong> SVG icons available via <code>{{`{{svg "icon-name"}}`}}</code> in templates.</p>
4+
<p>All <strong>{{.IconCount}}</strong> SVG icons available in templates.</p>
55
<p>
66
<input id="icon-search" type="text" placeholder="Filter icons..." class="ui input" style="width: 300px">
77
<label class="gt-checkbox tw-ml-4"><input id="icon-size-toggle" type="checkbox"> Large (24px)</label>

0 commit comments

Comments
 (0)