Skip to content

Commit

Permalink
Merge pull request #4 from DiegoDev2/ci
Browse files Browse the repository at this point in the history
add actions
  • Loading branch information
DiegoDev2 authored Nov 26, 2024
2 parents 9166997 + 4712eb2 commit 0141166
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 7 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
package main

import (
"fmt"
"os"

"github.com/DiegoDev2/resq/cli"
)

func main() {
// init()
cli.Command().Execute()
if err := cli.Command().Execute(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
}
10 changes: 5 additions & 5 deletions src/resq.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package resq

import (
"bytes"
"io/ioutil"
"io"
"net/http"
)

Expand All @@ -13,7 +13,7 @@ func Get(url string) string {
}
defer resp.Body.Close()

body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return "Error reading response body: " + err.Error()
}
Expand All @@ -28,7 +28,7 @@ func Post(url string, data string) string {
}
defer resp.Body.Close()

body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return "Error reading response body: " + err.Error()
}
Expand All @@ -50,7 +50,7 @@ func Put(url string, data string) string {
}
defer resp.Body.Close()

body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return "Error reading response body: " + err.Error()
}
Expand All @@ -71,7 +71,7 @@ func Delete(url string) string {
}
defer resp.Body.Close()

body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return "Error reading response body: " + err.Error()
}
Expand Down

0 comments on commit 0141166

Please sign in to comment.