๐พ 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
โฌ ๏ธ Previous capture (2024-02-05)
-=-=-=-=-=-=-
. ,-. ,-. . . ,-. ,-. ,-. ,-. ,-. ,-,-. ,-,-. . . ,-. . |- . . `-. | | | | | | |-' | | | | | | | | | | | | | | | | | `-' `-' `-^ ' `-' `-' :: `-' `-' ' ' ' ' ' ' `-^ ' ' ' `' `-| /| `-'
git clone https://source.community/ckaznocha/gemini.git
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โ } โโโโโฏ
ยท ยท ยท
ยฉ 2024 source.community