From 99e5af340c108013a7a63ecd27f9bd5988916a58 Mon Sep 17 00:00:00 2001 From: Matt Anderson <42154938+matoszz@users.noreply.github.com> Date: Mon, 23 Sep 2024 08:11:28 -0600 Subject: [PATCH] readme updates and taskfile cleanup (#10) * readme updates and taskfile cleanup * add back task --- .gitignore | 18 +----------------- README.md | 10 ++++++---- Taskfile.yaml | 13 +++++-------- 3 files changed, 12 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index 3d7b1eb..2eb2a1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,14 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe *.exe~ *.dll *.so *.dylib -# Test binary, built with `go test -c` *.test -# Output of the go coverage tool, specifically when used with LiteIDE *.out -# Go workspace file go.work -# local dev created files *.db core core-cli @@ -25,12 +16,9 @@ server.crt server.key private_key.pem public_key.pem -# Sendgrid test email folders -internal/httpserve/handlers/fixtures/emails/* -fixtures/emails/* + pkg/httpsling/testdata/* -# Packages *.7z *.dmg *.gz @@ -39,13 +27,10 @@ pkg/httpsling/testdata/* *.rar *.tar -# Logs *.log -# Editor files .vscode -# OS Generated Files .DS_Store* .AppleDouble .LSOverride @@ -59,5 +44,4 @@ results.txt *.mime *.mim -# Configs .task \ No newline at end of file diff --git a/README.md b/README.md index d4187be..0f18003 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ # Slinging HTTP -The `httpsling` library simplifies the way you make HTTP httpsling. It's intended to provide an easy-to-use interface for sending requests and handling responses, reducing the boilerplate code typically associated with the `net/http` package. +The `httpsling` library simplifies the way you make HTTP requests. It's intended to provide an easy-to-use interface for sending requests and handling responses, reducing the boilerplate code typically associated with the `net/http` package. ## Overview -Creating a new `Requestor` and making a request should be straightforward: +Creating a new `Requester` and making a request should be straightforward: ```go package main @@ -114,7 +114,7 @@ Custom TLS configurations can be applied for enhanced security measures, such as ## Requests -The library provides a `Receive` to construct and dispatch HTTP httpsling. Here are examples of performing various types of requests, including adding query parameters, setting headers, and attaching a body to your httpsling. +The library provides a `Receive` to construct and dispatch HTTP. Here are examples of performing various types of requests, including adding query parameters, setting headers, and attaching a body to your requests. #### GET Request @@ -208,4 +208,6 @@ This library was inspired by and built upon the work of several other HTTP clien - [Go-resty/resty](https://github.com/go-resty/resty) - [Fiber Client](https://github.com/gofiber/fiber) -Props to dghubble for a great name with `sling`, which was totally ripped off to make `httpsling` <3. I chose not to use any of these directly because I wanted to have layers of control we may need within our services echosystem. \ No newline at end of file +## Contributing + +See [contributing](.github/CONTRIBUTING.md) for details. \ No newline at end of file diff --git a/Taskfile.yaml b/Taskfile.yaml index 37df927..9ca0b0a 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -12,14 +12,6 @@ tasks: cmds: - golangci-lint run --config=.golangci.yaml --verbose --fast --fix - go:test: - desc: runs and outputs results of created go tests - aliases: ['go:test:psql', 'test:psql'] - env: - TEST_DB_URL: "docker://postgres:16-alpine" - cmds: - - go test -v ./... - go:fmt: desc: format all go code cmds: @@ -31,6 +23,11 @@ tasks: cmds: - go mod tidy + go:test: + desc: runs and outputs results of created go tests + cmds: + - go test -v ./... + go:test:cover: desc: runs and outputs results of created go tests with coverage aliases: [cover]