summaryrefslogtreecommitdiff
path: root/urls/addr.go
diff options
context:
space:
mode:
Diffstat (limited to 'urls/addr.go')
-rw-r--r--urls/addr.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/urls/addr.go b/urls/addr.go
deleted file mode 100644
index 6de7d3a..0000000
--- a/urls/addr.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package url
-
-import (
- "errors"
- "strings"
-)
-
-type Websites map[string]string
-
-type userParams struct {
- websites Websites
- timeout int
- retry bool
-}
-
-func NewWebsite(w string) (string, error) {
- if strings.HasPrefix(w, "http://") || strings.HasPrefix(w, "https://") {
- return w, nil
- }
-
- return w, errors.New("url entered is not an http or https url")
-}
-
-func (u *userParams) Getwebsites() (map[string]string, error) {
- if u.websites == nil {
- return nil, errors.New("no websites given in user params")
- }
-
- return u.websites, nil
-}