Basic functionality

This commit is contained in:
2024-10-04 13:15:07 +03:00
parent eb963542b7
commit 74be6b4d0d
7 changed files with 373 additions and 0 deletions

25
types.go Normal file
View File

@@ -0,0 +1,25 @@
package main
import (
"fmt"
)
type GeminiUrl struct {
protocol string
hostname string
port int
path string
descr string
}
func (self GeminiUrl) String() string {
return fmt.Sprintf("%s://%s:%d%s", self.protocol, self.hostname, self.port, self.path)
}
type Result struct {
url GeminiUrl
data string
links []GeminiUrl
code int
error error
}