Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rename buildRequest to BuildRequest to make it exported #394

Merged
merged 1 commit into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ftwhttp/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (c *Connection) receive() (io.Reader, error) {
// Request will use all the inputs and send a raw http request to the destination
func (c *Connection) Request(request *Request) error {
// Build request first, then connect and send, so timers are accurate
data, err := buildRequest(request)
data, err := BuildRequest(request)
if err != nil {
return fmt.Errorf("ftw/http: fatal error building request: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion ftwhttp/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (r Request) isRaw() bool {
}

// The request should be created with anything we want. We want to actually break HTTP.
func buildRequest(r *Request) ([]byte, error) {
func BuildRequest(r *Request) ([]byte, error) {
var err error
var b bytes.Buffer
var data []byte
Expand Down