https://github.com/reiver/go-gmni
Package gemini provides Gemini Protocol client and server implementations, for the Go programming language. The gemini package provides an API in a style similar to the "net/http" library that is part of the Go standard library, including support for "middleware".
https://github.com/reiver/go-gmni
gemini-protocol
Last synced: 10 months ago
JSON representation
Package gemini provides Gemini Protocol client and server implementations, for the Go programming language. The gemini package provides an API in a style similar to the "net/http" library that is part of the Go standard library, including support for "middleware".
- Host: GitHub
- URL: https://github.com/reiver/go-gmni
- Owner: reiver
- License: mit
- Created: 2021-08-02T22:54:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-12T02:59:10.000Z (over 4 years ago)
- Last Synced: 2025-01-25T13:08:42.599Z (12 months ago)
- Topics: gemini-protocol
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-gemini
Package **gemini** provides **Gemini Protocol** client and server implementations, for the Go programming language.
The **gemini** package provides an API in a style similar to the "net/http" library that is part of the Go standard library, including support for "middleware".
## Documention
Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-gemini
[](https://godoc.org/github.com/reiver/go-gemini)
## Example
A very very simple Gemini Protocol server is shown in the following code.
This particular Gemini Protocol server just responds to the client with the URI that was in the request, plus the remote address.
```go
package main
import (
"github.com/reiver/go-gemini"
)
func main() {
var handler gemini.Handler = gemini.DebugHandler
err := gemini.ListenAndServe(":1965", handler)
if nil != err {
//@TODO: Handle this error better.
panic(err)
}
}
```