From d88661935fa2b6e2c0fe93345800113e1a71b451 Mon Sep 17 00:00:00 2001 From: ewy Date: Wed, 22 Apr 2026 21:51:29 +0200 Subject: docs --- search/search.go | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'search') diff --git a/search/search.go b/search/search.go index fd06ab5..7d863b9 100644 --- a/search/search.go +++ b/search/search.go @@ -5,16 +5,25 @@ import ( "slices" ) +// Result is a struct containing information about the search and search results type Result struct { - Target model.Target - Source *model.Source + // Target is the target selected by the search + Target model.Target + // Source is the source belonging to the selected Target + Source *model.Source + // NeedsConfirmation is true when there are discrepancies between expected and actual invocation NeedsConfirmation bool - Overridden bool - Sub []string - Args []string + // Overridden is whether it was overridden by a .override target + Overridden bool + // Sub is the subcategory or -folder + Sub []string + // Args are the remaining arguments which we should pass to the target + Args []string } // Search is the meat of pik +// since there are a ton of different ways to invoke targets, leave a unit test +// when you change this func Search(s *model.State, args ...string) *Result { var target model.Target var targetSource *model.Source -- cgit v1.3.1