From 665695e3d0fe2d756f2945e30520989678517610 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Fri, 19 Nov 2021 16:52:45 +0100 Subject: [PATCH 1/2] Fix typo --- cmd/util.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/util.go b/cmd/util.go index 54e080a..b4769ca 100644 --- a/cmd/util.go +++ b/cmd/util.go @@ -40,15 +40,15 @@ func filter(options []string, tag string) (commands []string, err error) { } if 0 < len(tag) { - var filteredSnipets snippet.Snippets - for _, snipet := range snippets.Snippets { - for _, t := range snipet.Tag { + var filteredSnippets snippet.Snippets + for _, snippet := range snippets.Snippets { + for _, t := range snippet.Tag { if tag == t { - filteredSnipets.Snippets = append(filteredSnipets.Snippets, snipet) + filteredSnippets.Snippets = append(filteredSnippets.Snippets, snipet) } } } - snippets = filteredSnipets + snippets = filteredSnippets } snippetTexts := map[string]snippet.SnippetInfo{} From 22c333669ada6a3d603ee3629dacf9d2b2f5c530 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Fri, 19 Nov 2021 16:58:26 +0100 Subject: [PATCH 2/2] Update missing variable --- cmd/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/util.go b/cmd/util.go index b4769ca..cb40815 100644 --- a/cmd/util.go +++ b/cmd/util.go @@ -44,7 +44,7 @@ func filter(options []string, tag string) (commands []string, err error) { for _, snippet := range snippets.Snippets { for _, t := range snippet.Tag { if tag == t { - filteredSnippets.Snippets = append(filteredSnippets.Snippets, snipet) + filteredSnippets.Snippets = append(filteredSnippets.Snippets, snippet) } } }