Skip to content

Commit

Permalink
readme updates and taskfile cleanup (#10)
Browse files Browse the repository at this point in the history
* readme updates and taskfile cleanup

* add back task
  • Loading branch information
matoszz authored Sep 23, 2024
1 parent fb7354f commit 99e5af3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 29 deletions.
18 changes: 1 addition & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,24 @@
# 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
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
Expand All @@ -39,13 +27,10 @@ pkg/httpsling/testdata/*
*.rar
*.tar

# Logs
*.log

# Editor files
.vscode

# OS Generated Files
.DS_Store*
.AppleDouble
.LSOverride
Expand All @@ -59,5 +44,4 @@ results.txt
*.mime
*.mim

# Configs
.task
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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.
## Contributing

See [contributing](.github/CONTRIBUTING.md) for details.
13 changes: 5 additions & 8 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]
Expand Down

0 comments on commit 99e5af3

Please sign in to comment.