๐Ÿ’พ Archived View for source.community โ€บ ckaznocha โ€บ gemini โ€บ blob โ€บ main โ€บ geminitest โ€บ request.go captured on 2024-05-26 at 15:02:00. Gemini links have been rewritten to link to archived content

View Raw

More Information

โฌ…๏ธ Previous capture (2024-02-05)

-=-=-=-=-=-=-

                                                         .
,-. ,-. . . ,-. ,-. ,-.    ,-. ,-. ,-,-. ,-,-. . . ,-. . |- . .
`-. | | | | |   |   |-'    |   | | | | | | | | | | | | | |  | |
`-' `-' `-^ '   `-' `-' :: `-' `-' ' ' ' ' ' ' `-^ ' ' ' `' `-|
                                                             /|
                                                            `-'

Profile for ckaznocha

ckaznocha / gemini

git clone https://source.community/ckaznocha/gemini.git

Branches

Log

Tree

/geminitest/request.go (main)

โ†‘ /geminitest

blob

View raw contents of /geminitest/request.go (main)

โ”€โ”€โ”€โ”€โ•ฎ
   1โ”‚ package geminitest
   2โ”‚ 
   3โ”‚ import (
   4โ”‚ 	"bufio"
   5โ”‚ 	"strings"
   6โ”‚ 
   7โ”‚ 	"source.community/ckaznocha/gemini"
   8โ”‚ )
   9โ”‚ 
  10โ”‚ // NewRequest returns a Reqaust for use in tests.
  11โ”‚ func NewRequest(target string) *gemini.Request {
  12โ”‚ 	req, err := gemini.ReadRequest(bufio.NewReader(strings.NewReader(target + "\r\n")))
  13โ”‚ 	if err != nil {
  14โ”‚ 		panic("invalid NewRequest arguments; " + err.Error())
  15โ”‚ 	}
  16โ”‚ 
  17โ”‚ 	req.RemoteAddr = "192.0.2.1:1234"
  18โ”‚ 
  19โ”‚ 	if req.URI.Host == "" {
  20โ”‚ 		req.URI.Host = "example.com"
  21โ”‚ 	}
  22โ”‚ 
  23โ”‚ 	return req
  24โ”‚ }
โ”€โ”€โ”€โ”€โ•ฏ

ยท ยท ยท

๐Ÿก Home

FAQs

Privacy Policy

Terms & Conditions

Official Gemlog

info@source.community

ยฉ 2024 source.community