summary refs log tree commit diff stats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/cetus/cetus.go15
-rw-r--r--pkg/wallhaven/wallhaven.go20
2 files changed, 1 insertions, 34 deletions
diff --git a/pkg/cetus/cetus.go b/pkg/cetus/cetus.go
index c3f86cb..17fd906 100644
--- a/pkg/cetus/cetus.go
+++ b/pkg/cetus/cetus.go
@@ -5,22 +5,9 @@ import (
 	"log"
 )
 
-var version string = "v0.4.11"
+var version string = "v0.5.0"
 
 // Version prints cetus version
 func Version() {
 	fmt.Printf("Cetus %s\n", version)
 }
-
-// PrintPath prints the path passed
-func PrintPath(path string) {
-	fmt.Println(path)
-}
-
-// ErrChk logs the context & error
-func ErrChk(ctx string, err error) {
-	if err != nil {
-		log.Println(ctx)
-		log.Fatal(err)
-	}
-}
diff --git a/pkg/wallhaven/wallhaven.go b/pkg/wallhaven/wallhaven.go
deleted file mode 100644
index 25af77c..0000000
--- a/pkg/wallhaven/wallhaven.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package wallhaven
-
-import (
-	"time"
-
-	"framagit.org/andinus/cetus/pkg/cetus"
-)
-
-// GetWhJson returns json response received from the api
-func GetWhJson(reqInfo map[string]string, t time.Duration) (string, error) {
-	params := make(map[string]string)
-	params["apikey"] = reqInfo["apiKey"]
-	if reqInfo["random"] == "true" {
-		params["sorting"] = "random"
-
-	}
-
-	body, err := cetus.GetRes(reqInfo["api"], params, t)
-	return string(body), err
-}