refactor: removed println

Signed-off-by: SoXX <soxx@fenpa.ws>
This commit is contained in:
SoXX 2023-11-06 15:31:46 +01:00
parent 06ba87d1f2
commit 12b8bb5b2c
6 changed files with 12 additions and 18 deletions

View File

@ -5,7 +5,6 @@ import (
"fmt"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/model"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/utils"
"log"
"net/http"
)
@ -24,7 +23,7 @@ func GetFavorites(requestContext model.RequestContext, query map[string]string)
// Create a new HTTP GET request.
r, err := http.NewRequest("GET", fmt.Sprintf("%s/favorites.json", requestContext.Host), nil)
if err != nil {
log.Print(err)
return nil, err
}
// Append query parameters to the request URL.
@ -41,7 +40,7 @@ func GetFavorites(requestContext model.RequestContext, query map[string]string)
// Send the request using the provided http.Client.
resp, err := requestContext.Client.Do(r)
if err != nil {
log.Print(err)
return nil, err
}
// Check if the HTTP response status code indicates success (2xx range).

View File

@ -6,7 +6,6 @@ import (
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/model"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/utils"
"io"
"log"
"net/http"
"strings"
)
@ -75,7 +74,7 @@ func GetNotes(requestContext model.RequestContext, query map[string]string) ([]m
// Create a new HTTP GET request.
r, err := http.NewRequest("GET", fmt.Sprintf("%s/notes.json", requestContext.Host), nil)
if err != nil {
log.Print(err)
return nil, err
}
// Append query parameters to the request URL.
@ -92,7 +91,7 @@ func GetNotes(requestContext model.RequestContext, query map[string]string) ([]m
// Send the request using the provided http.Client.
resp, err := requestContext.Client.Do(r)
if err != nil {
log.Print(err)
return nil, err
}
// Check if the HTTP response status code indicates success (2xx range).

View File

@ -5,7 +5,6 @@ import (
"fmt"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/model"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/utils"
"log"
"net/http"
)
@ -73,7 +72,7 @@ func GetPools(requestContext model.RequestContext, query map[string]string) ([]m
// Create a new HTTP GET request.
r, err := http.NewRequest("GET", fmt.Sprintf("%s/pools.json", requestContext.Host), nil)
if err != nil {
log.Print(err)
return nil, err
}
// Append query parameters to the request URL.
@ -90,7 +89,7 @@ func GetPools(requestContext model.RequestContext, query map[string]string) ([]m
// Send the request using the provided http.Client.
resp, err := requestContext.Client.Do(r)
if err != nil {
log.Print(err)
return nil, err
}
// Check if the HTTP response status code indicates success (2xx range).

View File

@ -5,7 +5,6 @@ import (
"fmt"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/model"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/utils"
"log"
"net/http"
)
@ -72,7 +71,7 @@ func GetPosts(requestContext model.RequestContext, query map[string]string) ([]m
// Create a new HTTP GET request.
r, err := http.NewRequest("GET", fmt.Sprintf("%s/posts.json", requestContext.Host), nil)
if err != nil {
log.Print(err)
return nil, err
}
// Append query parameters to the request URL.
@ -89,7 +88,7 @@ func GetPosts(requestContext model.RequestContext, query map[string]string) ([]m
// Send the request using the provided http.Client.
resp, err := requestContext.Client.Do(r)
if err != nil {
log.Print(err)
return nil, err
}
// Check if the HTTP response status code indicates success (2xx range).

View File

@ -5,7 +5,6 @@ import (
"fmt"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/model"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/utils"
"log"
"net/http"
)
@ -84,7 +83,7 @@ func GetTags(requestContext model.RequestContext, query map[string]string) ([]mo
// Create a new HTTP GET request.
r, err := http.NewRequest("GET", fmt.Sprintf("%s/tags.json", requestContext.Host), nil)
if err != nil {
log.Print(err)
return nil, err
}
// Append query parameters to the request URL.
@ -101,7 +100,7 @@ func GetTags(requestContext model.RequestContext, query map[string]string) ([]mo
// Send the request using the provided http.Client.
resp, err := requestContext.Client.Do(r)
if err != nil {
log.Print(err)
return nil, err
}
// Check if the HTTP response status code indicates success (2xx range).

View File

@ -5,7 +5,6 @@ import (
"fmt"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/model"
"git.dragse.it/anthrove/e621-sdk-go/pkg/e621/utils"
"log"
"net/http"
)
@ -73,7 +72,7 @@ func GetUsers(requestContext model.RequestContext, query map[string]string) ([]m
// Create a new HTTP GET request.
r, err := http.NewRequest("GET", fmt.Sprintf("%s/users.json", requestContext.Host), nil)
if err != nil {
log.Print(err)
return nil, err
}
// Append query parameters to the request URL.
@ -90,7 +89,7 @@ func GetUsers(requestContext model.RequestContext, query map[string]string) ([]m
// Send the request using the provided http.Client.
resp, err := requestContext.Client.Do(r)
if err != nil {
log.Print(err)
return nil, err
}
// Check if the HTTP response status code indicates success (2xx range).