diff options
author | Andinus <andinus@nand.sh> | 2020-03-19 00:13:54 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2020-03-19 00:13:54 +0530 |
commit | 50900c5e18bd5aa1a2329ca3d53ca3713ec5d137 (patch) | |
tree | c009a73adf2225b56b654f8ea20ceb9fc6d836e0 /pkg | |
parent | e96878ff2d111c91feaf4308240902795b911253 (diff) | |
download | cetus-50900c5e18bd5aa1a2329ca3d53ca3713ec5d137.tar.gz |
Remove package cetus
Moved req.go to request package & version to main.go
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/apod/json.go | 4 | ||||
-rw-r--r-- | pkg/bpod/json.go | 4 | ||||
-rw-r--r-- | pkg/cetus/cetus.go | 12 | ||||
-rw-r--r-- | pkg/request/req.go (renamed from pkg/cetus/req.go) | 2 |
4 files changed, 5 insertions, 17 deletions
diff --git a/pkg/apod/json.go b/pkg/apod/json.go index 4589925..d484209 100644 --- a/pkg/apod/json.go +++ b/pkg/apod/json.go @@ -5,7 +5,7 @@ import ( "fmt" "regexp" - "framagit.org/andinus/cetus/pkg/cetus" + "framagit.org/andinus/cetus/pkg/request" ) // Res holds the response from the api. @@ -43,6 +43,6 @@ func GetJson(reqInfo map[string]string) (string, error) { params["api_key"] = reqInfo["apiKey"] params["date"] = reqInfo["date"] - body, err := cetus.GetRes(reqInfo["api"], params) + body, err := request.GetRes(reqInfo["api"], params) return string(body), err } diff --git a/pkg/bpod/json.go b/pkg/bpod/json.go index 4d74668..d895bcf 100644 --- a/pkg/bpod/json.go +++ b/pkg/bpod/json.go @@ -5,7 +5,7 @@ import ( "fmt" "math/rand" - "framagit.org/andinus/cetus/pkg/cetus" + "framagit.org/andinus/cetus/pkg/request" ) type Res struct { @@ -50,6 +50,6 @@ func GetJson(reqInfo map[string]string) (string, error) { } - body, err := cetus.GetRes(reqInfo["api"], params) + body, err := request.GetRes(reqInfo["api"], params) return string(body), err } diff --git a/pkg/cetus/cetus.go b/pkg/cetus/cetus.go deleted file mode 100644 index 0e9b7c2..0000000 --- a/pkg/cetus/cetus.go +++ /dev/null @@ -1,12 +0,0 @@ -package cetus - -import ( - "fmt" -) - -var version string = "v0.5.0" - -// Version prints cetus version -func Version() { - fmt.Printf("Cetus %s\n", version) -} diff --git a/pkg/cetus/req.go b/pkg/request/req.go index ed81374..350f5f6 100644 --- a/pkg/cetus/req.go +++ b/pkg/request/req.go @@ -1,4 +1,4 @@ -package cetus +package request import ( "fmt" |