aboutsummaryrefslogtreecommitdiff
path: root/misc.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc.go')
-rw-r--r--misc.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc.go b/misc.go
index cda4374..8e6c5aa 100644
--- a/misc.go
+++ b/misc.go
@@ -78,9 +78,14 @@ type Search struct {
ResultsGalleryTemp []Deviation `json:"results"`
}
-func PerformSearch(query string, page int, scope rune, user ...string) (ss Search, err error, daError Error) {
+func PerformSearch(query string, page int, scope rune, user ...string) (ss Search, daError Error, err error) {
var buildurl strings.Builder
+ if user == nil {
+ err = errors.New("missing username (last argument)")
+ return
+ }
+
// о5 построение ссылок.
switch scope {
case 'a': // поиск артов по названию